Commit cf33353b authored by Winnie Hellmann's avatar Winnie Hellmann

Remove duplicate store_frontend_fixture() calls

for f in $(find spec/javascripts/fixtures/ -name '*.rb')
do
  grep -v store_frontend_fixture < $f > $f.tmp; mv $f.tmp $f
done
parent 66cd2e97
...@@ -22,6 +22,5 @@ describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controll ...@@ -22,6 +22,5 @@ describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controll
get :index get :index
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -24,6 +24,5 @@ describe Admin::UsersController, '(JavaScript fixtures)', type: :controller do ...@@ -24,6 +24,5 @@ describe Admin::UsersController, '(JavaScript fixtures)', type: :controller do
get :new get :new
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -29,6 +29,5 @@ describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', type: :c ...@@ -29,6 +29,5 @@ describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', type: :c
get :show get :show
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -35,6 +35,5 @@ describe Projects::AutocompleteSourcesController, '(JavaScript fixtures)', type: ...@@ -35,6 +35,5 @@ describe Projects::AutocompleteSourcesController, '(JavaScript fixtures)', type:
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -30,6 +30,5 @@ describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do ...@@ -30,6 +30,5 @@ describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do
}) })
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -24,6 +24,5 @@ describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller ...@@ -24,6 +24,5 @@ describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller
}) })
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -28,6 +28,5 @@ describe Projects::BranchesController, '(JavaScript fixtures)', type: :controlle ...@@ -28,6 +28,5 @@ describe Projects::BranchesController, '(JavaScript fixtures)', type: :controlle
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -30,6 +30,5 @@ describe Projects::ClustersController, '(JavaScript fixtures)', type: :controlle ...@@ -30,6 +30,5 @@ describe Projects::ClustersController, '(JavaScript fixtures)', type: :controlle
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -29,6 +29,5 @@ describe Projects::CommitController, '(JavaScript fixtures)', type: :controller ...@@ -29,6 +29,5 @@ describe Projects::CommitController, '(JavaScript fixtures)', type: :controller
get :show, params: params get :show, params: params
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -39,6 +39,5 @@ describe Projects::DeployKeysController, '(JavaScript fixtures)', type: :control ...@@ -39,6 +39,5 @@ describe Projects::DeployKeysController, '(JavaScript fixtures)', type: :control
}, format: :json }, format: :json
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -22,7 +22,6 @@ describe 'Groups (JavaScript fixtures)', type: :controller do ...@@ -22,7 +22,6 @@ describe 'Groups (JavaScript fixtures)', type: :controller do
get :edit, params: { id: group } get :edit, params: { id: group }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -31,7 +30,6 @@ describe 'Groups (JavaScript fixtures)', type: :controller do ...@@ -31,7 +30,6 @@ describe 'Groups (JavaScript fixtures)', type: :controller do
get :show, params: { group_id: group } get :show, params: { group_id: group }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
end end
...@@ -49,7 +49,6 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller ...@@ -49,7 +49,6 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
private private
...@@ -62,7 +61,6 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller ...@@ -62,7 +61,6 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, fixture_file_name)
end end
end end
...@@ -120,6 +118,5 @@ describe API::Issues, '(JavaScript fixtures)', type: :request do ...@@ -120,6 +118,5 @@ describe API::Issues, '(JavaScript fixtures)', type: :request do
get_related_merge_requests(project.id, issue.iid, user) get_related_merge_requests(project.id, issue.iid, user)
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -40,7 +40,6 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do ...@@ -40,7 +40,6 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
it 'jobs/delayed.json' do |example| it 'jobs/delayed.json' do |example|
...@@ -51,6 +50,5 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do ...@@ -51,6 +50,5 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do
}, format: :json }, format: :json
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -36,7 +36,6 @@ describe 'Labels (JavaScript fixtures)' do ...@@ -36,7 +36,6 @@ describe 'Labels (JavaScript fixtures)' do
}, format: 'json' }, format: 'json'
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -54,7 +53,6 @@ describe 'Labels (JavaScript fixtures)' do ...@@ -54,7 +53,6 @@ describe 'Labels (JavaScript fixtures)' do
}, format: 'json' }, format: 'json'
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
end end
...@@ -121,7 +121,6 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont ...@@ -121,7 +121,6 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont
id: merge_request.to_param id: merge_request.to_param
}, format: :json }, format: :json
store_frontend_fixture(response, fixture_file_name)
end end
def render_merge_request(fixture_file_name, merge_request) def render_merge_request(fixture_file_name, merge_request)
...@@ -132,6 +131,5 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont ...@@ -132,6 +131,5 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont
}, format: :html }, format: :html
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, fixture_file_name)
end end
end end
...@@ -66,6 +66,5 @@ describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)', type ...@@ -66,6 +66,5 @@ describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)', type
}, format: :json }, format: :json
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, fixture_file_name)
end end
end end
...@@ -29,7 +29,6 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: : ...@@ -29,7 +29,6 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
it 'pipeline_schedules/edit_with_variables.html' do |example| it 'pipeline_schedules/edit_with_variables.html' do |example|
...@@ -40,6 +39,5 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: : ...@@ -40,6 +39,5 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -30,6 +30,5 @@ describe Projects::PipelinesController, '(JavaScript fixtures)', type: :controll ...@@ -30,6 +30,5 @@ describe Projects::PipelinesController, '(JavaScript fixtures)', type: :controll
}, format: :json }, format: :json
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -35,7 +35,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -35,7 +35,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
it 'projects/overview.html' do |example| it 'projects/overview.html' do |example|
...@@ -45,7 +44,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -45,7 +44,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
it 'projects/edit.html' do |example| it 'projects/edit.html' do |example|
...@@ -55,7 +53,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -55,7 +53,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -67,7 +64,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -67,7 +64,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
it 'projects/ci_cd_settings_with_variables.html' do |example| it 'projects/ci_cd_settings_with_variables.html' do |example|
...@@ -80,7 +76,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -80,7 +76,6 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
end end
...@@ -30,6 +30,5 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle ...@@ -30,6 +30,5 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -20,30 +20,25 @@ describe 'Raw files', '(JavaScript fixtures)' do ...@@ -20,30 +20,25 @@ describe 'Raw files', '(JavaScript fixtures)' do
it 'blob/balsamiq/test.bmpr' do |example| it 'blob/balsamiq/test.bmpr' do |example|
@blob = project.repository.blob_at('b89b56d79', 'files/images/balsamiq.bmpr') @blob = project.repository.blob_at('b89b56d79', 'files/images/balsamiq.bmpr')
store_frontend_fixture(response, example.description)
end end
it 'blob/notebook/basic.json' do |example| it 'blob/notebook/basic.json' do |example|
@blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb') @blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb')
store_frontend_fixture(response, example.description)
end end
it 'blob/notebook/worksheets.json' do |example| it 'blob/notebook/worksheets.json' do |example|
@blob = project.repository.blob_at('6d85bb69', 'files/ipython/worksheets.ipynb') @blob = project.repository.blob_at('6d85bb69', 'files/ipython/worksheets.ipynb')
store_frontend_fixture(response, example.description)
end end
it 'blob/notebook/math.json' do |example| it 'blob/notebook/math.json' do |example|
@blob = project.repository.blob_at('93ee732', 'files/ipython/math.ipynb') @blob = project.repository.blob_at('93ee732', 'files/ipython/math.ipynb')
store_frontend_fixture(response, example.description)
end end
it 'blob/pdf/test.pdf' do |example| it 'blob/pdf/test.pdf' do |example|
@blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf') @blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf')
store_frontend_fixture(response, example.description)
end end
end end
...@@ -13,6 +13,5 @@ describe SearchController, '(JavaScript fixtures)', type: :controller do ...@@ -13,6 +13,5 @@ describe SearchController, '(JavaScript fixtures)', type: :controller do
get :show get :show
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -30,6 +30,5 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle ...@@ -30,6 +30,5 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle
} }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -20,7 +20,6 @@ describe 'Sessions (JavaScript fixtures)' do ...@@ -20,7 +20,6 @@ describe 'Sessions (JavaScript fixtures)' do
get :new get :new
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
end end
...@@ -29,6 +29,5 @@ describe SnippetsController, '(JavaScript fixtures)', type: :controller do ...@@ -29,6 +29,5 @@ describe SnippetsController, '(JavaScript fixtures)', type: :controller do
get(:show, params: { id: snippet.to_param }) get(:show, params: { id: snippet.to_param })
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -30,7 +30,6 @@ describe 'Todos (JavaScript fixtures)' do ...@@ -30,7 +30,6 @@ describe 'Todos (JavaScript fixtures)' do
get :index get :index
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -50,7 +49,6 @@ describe 'Todos (JavaScript fixtures)' do ...@@ -50,7 +49,6 @@ describe 'Todos (JavaScript fixtures)' do
}, format: 'json' }, format: 'json'
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
end end
...@@ -24,7 +24,6 @@ context 'U2F' do ...@@ -24,7 +24,6 @@ context 'U2F' do
post :create, params: { user: { login: user.username, password: user.password } } post :create, params: { user: { login: user.username, password: user.password } }
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
...@@ -40,7 +39,6 @@ context 'U2F' do ...@@ -40,7 +39,6 @@ context 'U2F' do
get :show get :show
expect(response).to be_success expect(response).to be_success
store_frontend_fixture(response, example.description)
end end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment