diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2018-01-26 00:25:26 -0600 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2018-01-31 17:37:49 -0600 |
commit | 9f07461dac40206a80e5e080e845fe156a5c31d6 (patch) | |
tree | 97c374426e6ee971c3aeeca336d0d2d07e1bbe6d /spec/javascripts/fixtures/pipeline_schedules.rb | |
parent | 3929d93fb3c10d66cbeeaf1079b988f63cf1543a (diff) | |
download | gitlab-ce-9f07461dac40206a80e5e080e845fe156a5c31d6.tar.gz |
Refactor CI variable list code for usage with CI/CD settings page secret variablesce-39118-dynamic-pipeline-variables-fe-base
Part of https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/4110
Diffstat (limited to 'spec/javascripts/fixtures/pipeline_schedules.rb')
-rw-r--r-- | spec/javascripts/fixtures/pipeline_schedules.rb | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/spec/javascripts/fixtures/pipeline_schedules.rb b/spec/javascripts/fixtures/pipeline_schedules.rb new file mode 100644 index 00000000000..56f27ea7df1 --- /dev/null +++ b/spec/javascripts/fixtures/pipeline_schedules.rb @@ -0,0 +1,43 @@ +require 'spec_helper' + +describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :controller do + include JavaScriptFixturesHelpers + + let(:admin) { create(:admin) } + let(:namespace) { create(:namespace, name: 'frontend-fixtures' )} + let(:project) { create(:project, :public, :repository) } + let!(:pipeline_schedule) { create(:ci_pipeline_schedule, project: project, owner: admin) } + let!(:pipeline_schedule_populated) { create(:ci_pipeline_schedule, project: project, owner: admin) } + let!(:pipeline_schedule_variable1) { create(:ci_pipeline_schedule_variable, key: 'foo', value: 'foovalue', pipeline_schedule: pipeline_schedule_populated) } + let!(:pipeline_schedule_variable2) { create(:ci_pipeline_schedule_variable, key: 'bar', value: 'barvalue', pipeline_schedule: pipeline_schedule_populated) } + + render_views + + before(:all) do + clean_frontend_fixtures('pipeline_schedules/') + end + + before do + sign_in(admin) + end + + it 'pipeline_schedules/edit.html.raw' do |example| + get :edit, + namespace_id: project.namespace.to_param, + project_id: project, + id: pipeline_schedule.id + + expect(response).to be_success + store_frontend_fixture(response, example.description) + end + + it 'pipeline_schedules/edit_with_variables.html.raw' do |example| + get :edit, + namespace_id: project.namespace.to_param, + project_id: project, + id: pipeline_schedule_populated.id + + expect(response).to be_success + store_frontend_fixture(response, example.description) + end +end |