2017-01-30 17:42:02 -05:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe ProjectsController, '(JavaScript fixtures)', type: :controller do
|
|
|
|
include JavaScriptFixturesHelpers
|
|
|
|
|
|
|
|
let(:admin) { create(:admin) }
|
|
|
|
let(:namespace) { create(:namespace, name: 'frontend-fixtures' )}
|
2017-08-02 15:55:11 -04:00
|
|
|
let(:project) { create(:project, namespace: namespace, path: 'builds-project') }
|
2017-01-30 17:42:02 -05:00
|
|
|
|
|
|
|
render_views
|
|
|
|
|
|
|
|
before(:all) do
|
|
|
|
clean_frontend_fixtures('projects/')
|
|
|
|
end
|
|
|
|
|
2017-08-10 18:31:42 -04:00
|
|
|
before do
|
2017-01-30 17:42:02 -05:00
|
|
|
sign_in(admin)
|
|
|
|
end
|
|
|
|
|
2017-08-22 19:19:35 -04:00
|
|
|
after do
|
|
|
|
remove_repository(project)
|
|
|
|
end
|
|
|
|
|
2017-01-30 17:42:02 -05:00
|
|
|
it 'projects/dashboard.html.raw' do |example|
|
|
|
|
get :show,
|
|
|
|
namespace_id: project.namespace.to_param,
|
2017-02-23 18:55:01 -05:00
|
|
|
id: project
|
2017-01-30 17:42:02 -05:00
|
|
|
|
|
|
|
expect(response).to be_success
|
|
|
|
store_frontend_fixture(response, example.description)
|
|
|
|
end
|
|
|
|
end
|