Commit d4bde862 authored by Winnie Hellmann's avatar Winnie Hellmann

Remove example block parameters

for f in $(find spec/javascripts/fixtures/ -name '*.rb')
do
  sed 's/do |example|/do/' < $f > $f.tmp; mv $f.tmp $f
done
parent cf33353b
...@@ -18,7 +18,7 @@ describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controll ...@@ -18,7 +18,7 @@ describe Admin::AbuseReportsController, '(JavaScript fixtures)', type: :controll
sign_in(admin) sign_in(admin)
end end
it 'abuse_reports/abuse_reports_list.html' do |example| it 'abuse_reports/abuse_reports_list.html' do
get :index get :index
expect(response).to be_success expect(response).to be_success
......
...@@ -17,7 +17,7 @@ describe Admin::UsersController, '(JavaScript fixtures)', type: :controller do ...@@ -17,7 +17,7 @@ describe Admin::UsersController, '(JavaScript fixtures)', type: :controller do
clean_frontend_fixtures('admin/users') clean_frontend_fixtures('admin/users')
end end
it 'admin/users/new_with_internal_user_regex.html' do |example| it 'admin/users/new_with_internal_user_regex.html' do
stub_application_setting(user_default_external: true) stub_application_setting(user_default_external: true)
stub_application_setting(user_default_internal_regex: '^(?:(?!\.ext@).)*$\r?') stub_application_setting(user_default_internal_regex: '^(?:(?!\.ext@).)*$\r?')
......
...@@ -23,7 +23,7 @@ describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', type: :c ...@@ -23,7 +23,7 @@ describe Admin::ApplicationSettingsController, '(JavaScript fixtures)', type: :c
remove_repository(project) remove_repository(project)
end end
it 'application_settings/accounts_and_limit.html' do |example| it 'application_settings/accounts_and_limit.html' do
stub_application_setting(user_default_external: false) stub_application_setting(user_default_external: false)
get :show get :show
......
...@@ -18,7 +18,7 @@ describe Projects::AutocompleteSourcesController, '(JavaScript fixtures)', type: ...@@ -18,7 +18,7 @@ describe Projects::AutocompleteSourcesController, '(JavaScript fixtures)', type:
sign_in(admin) sign_in(admin)
end end
it 'autocomplete_sources/labels.json' do |example| it 'autocomplete_sources/labels.json' do
issue.labels << create(:label, project: project, title: 'bug') issue.labels << create(:label, project: project, title: 'bug')
issue.labels << create(:label, project: project, title: 'critical') issue.labels << create(:label, project: project, title: 'critical')
......
...@@ -22,7 +22,7 @@ describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do ...@@ -22,7 +22,7 @@ describe Projects::BlobController, '(JavaScript fixtures)', type: :controller do
remove_repository(project) remove_repository(project)
end end
it 'blob/show.html' do |example| it 'blob/show.html' do
get(:show, params: { get(:show, params: {
namespace_id: project.namespace, namespace_id: project.namespace,
project_id: project, project_id: project,
......
...@@ -17,7 +17,7 @@ describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller ...@@ -17,7 +17,7 @@ describe Projects::BoardsController, '(JavaScript fixtures)', type: :controller
sign_in(admin) sign_in(admin)
end end
it 'boards/show.html' do |example| it 'boards/show.html' do
get(:index, params: { get(:index, params: {
namespace_id: project.namespace, namespace_id: project.namespace,
project_id: project project_id: project
......
...@@ -21,7 +21,7 @@ describe Projects::BranchesController, '(JavaScript fixtures)', type: :controlle ...@@ -21,7 +21,7 @@ describe Projects::BranchesController, '(JavaScript fixtures)', type: :controlle
remove_repository(project) remove_repository(project)
end end
it 'branches/new_branch.html' do |example| it 'branches/new_branch.html' do
get :new, params: { get :new, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project project_id: project
......
...@@ -22,7 +22,7 @@ describe Projects::ClustersController, '(JavaScript fixtures)', type: :controlle ...@@ -22,7 +22,7 @@ describe Projects::ClustersController, '(JavaScript fixtures)', type: :controlle
remove_repository(project) remove_repository(project)
end end
it 'clusters/show_cluster.html' do |example| it 'clusters/show_cluster.html' do
get :show, params: { get :show, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
......
...@@ -19,7 +19,7 @@ describe Projects::CommitController, '(JavaScript fixtures)', type: :controller ...@@ -19,7 +19,7 @@ describe Projects::CommitController, '(JavaScript fixtures)', type: :controller
allow(SecureRandom).to receive(:hex).and_return('securerandomhex:thereisnospoon') allow(SecureRandom).to receive(:hex).and_return('securerandomhex:thereisnospoon')
end end
it 'commit/show.html' do |example| it 'commit/show.html' do
params = { params = {
namespace_id: project.namespace, namespace_id: project.namespace,
project_id: project, project_id: project,
......
...@@ -24,7 +24,7 @@ describe Projects::DeployKeysController, '(JavaScript fixtures)', type: :control ...@@ -24,7 +24,7 @@ describe Projects::DeployKeysController, '(JavaScript fixtures)', type: :control
render_views render_views
it 'deploy_keys/keys.json' do |example| it 'deploy_keys/keys.json' do
create(:rsa_deploy_key_2048, public: true) create(:rsa_deploy_key_2048, public: true)
project_key = create(:deploy_key, key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCdMHEHyhRjbhEZVddFn6lTWdgEy5Q6Bz4nwGB76xWZI5YT/1WJOMEW+sL5zYd31kk7sd3FJ5L9ft8zWMWrr/iWXQikC2cqZK24H1xy+ZUmrRuJD4qGAaIVoyyzBL+avL+lF8J5lg6YSw8gwJY/lX64/vnJHUlWw2n5BF8IFOWhiw== dummy@gitlab.com') project_key = create(:deploy_key, key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQCdMHEHyhRjbhEZVddFn6lTWdgEy5Q6Bz4nwGB76xWZI5YT/1WJOMEW+sL5zYd31kk7sd3FJ5L9ft8zWMWrr/iWXQikC2cqZK24H1xy+ZUmrRuJD4qGAaIVoyyzBL+avL+lF8J5lg6YSw8gwJY/lX64/vnJHUlWw2n5BF8IFOWhiw== dummy@gitlab.com')
internal_key = create(:deploy_key, key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDNd/UJWhPrpb+b/G5oL109y57yKuCxE+WUGJGYaj7WQKsYRJmLYh1mgjrl+KVyfsWpq4ylOxIfFSnN9xBBFN8mlb0Fma5DC7YsSsibJr3MZ19ZNBprwNcdogET7aW9I0In7Wu5f2KqI6e5W/spJHCy4JVxzVMUvk6Myab0LnJ2iQ== dummy@gitlab.com') internal_key = create(:deploy_key, key: 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQDNd/UJWhPrpb+b/G5oL109y57yKuCxE+WUGJGYaj7WQKsYRJmLYh1mgjrl+KVyfsWpq4ylOxIfFSnN9xBBFN8mlb0Fma5DC7YsSsibJr3MZ19ZNBprwNcdogET7aW9I0In7Wu5f2KqI6e5W/spJHCy4JVxzVMUvk6Myab0LnJ2iQ== dummy@gitlab.com')
......
...@@ -18,7 +18,7 @@ describe 'Groups (JavaScript fixtures)', type: :controller do ...@@ -18,7 +18,7 @@ describe 'Groups (JavaScript fixtures)', type: :controller do
end end
describe GroupsController, '(JavaScript fixtures)', type: :controller do describe GroupsController, '(JavaScript fixtures)', type: :controller do
it 'groups/edit.html' do |example| it 'groups/edit.html' do
get :edit, params: { id: group } get :edit, params: { id: group }
expect(response).to be_success expect(response).to be_success
...@@ -26,7 +26,7 @@ describe 'Groups (JavaScript fixtures)', type: :controller do ...@@ -26,7 +26,7 @@ describe 'Groups (JavaScript fixtures)', type: :controller do
end end
describe Groups::Settings::CiCdController, '(JavaScript fixtures)', type: :controller do describe Groups::Settings::CiCdController, '(JavaScript fixtures)', type: :controller do
it 'groups/ci_cd_settings.html' do |example| it 'groups/ci_cd_settings.html' do
get :show, params: { group_id: group } get :show, params: { group_id: group }
expect(response).to be_success expect(response).to be_success
......
...@@ -21,26 +21,26 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller ...@@ -21,26 +21,26 @@ describe Projects::IssuesController, '(JavaScript fixtures)', type: :controller
remove_repository(project) remove_repository(project)
end end
it 'issues/open-issue.html' do |example| it 'issues/open-issue.html' do
render_issue(example.description, create(:issue, project: project)) render_issue(example.description, create(:issue, project: project))
end end
it 'issues/closed-issue.html' do |example| it 'issues/closed-issue.html' do
render_issue(example.description, create(:closed_issue, project: project)) render_issue(example.description, create(:closed_issue, project: project))
end end
it 'issues/issue-with-task-list.html' do |example| it 'issues/issue-with-task-list.html' do
issue = create(:issue, project: project, description: '- [ ] Task List Item') issue = create(:issue, project: project, description: '- [ ] Task List Item')
render_issue(example.description, issue) render_issue(example.description, issue)
end end
it 'issues/issue_with_comment.html' do |example| it 'issues/issue_with_comment.html' do
issue = create(:issue, project: project) issue = create(:issue, project: project)
create(:note, project: project, noteable: issue, note: '- [ ] Task List Item').save create(:note, project: project, noteable: issue, note: '- [ ] Task List Item').save
render_issue(example.description, issue) render_issue(example.description, issue)
end end
it 'issues/issue_list.html' do |example| it 'issues/issue_list.html' do
create(:issue, project: project) create(:issue, project: project)
get :index, params: { get :index, params: {
...@@ -87,7 +87,7 @@ describe API::Issues, '(JavaScript fixtures)', type: :request do ...@@ -87,7 +87,7 @@ describe API::Issues, '(JavaScript fixtures)', type: :request do
end end
end end
it 'issues/related_merge_requests.json' do |example| it 'issues/related_merge_requests.json' do
user = create(:user) user = create(:user)
project = create(:project, :public, creator_id: user.id, namespace: user.namespace) project = create(:project, :public, creator_id: user.id, namespace: user.namespace)
issue_title = 'foo' issue_title = 'foo'
......
...@@ -32,7 +32,7 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do ...@@ -32,7 +32,7 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do
remove_repository(project) remove_repository(project)
end end
it 'builds/build-with-artifacts.html' do |example| it 'builds/build-with-artifacts.html' do
get :show, params: { get :show, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
...@@ -42,7 +42,7 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do ...@@ -42,7 +42,7 @@ describe Projects::JobsController, '(JavaScript fixtures)', type: :controller do
expect(response).to be_success expect(response).to be_success
end end
it 'jobs/delayed.json' do |example| it 'jobs/delayed.json' do
get :show, params: { get :show, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
......
...@@ -30,7 +30,7 @@ describe 'Labels (JavaScript fixtures)' do ...@@ -30,7 +30,7 @@ describe 'Labels (JavaScript fixtures)' do
sign_in(admin) sign_in(admin)
end end
it 'labels/group_labels.json' do |example| it 'labels/group_labels.json' do
get :index, params: { get :index, params: {
group_id: group group_id: group
}, format: 'json' }, format: 'json'
...@@ -46,7 +46,7 @@ describe 'Labels (JavaScript fixtures)' do ...@@ -46,7 +46,7 @@ describe 'Labels (JavaScript fixtures)' do
sign_in(admin) sign_in(admin)
end end
it 'labels/project_labels.json' do |example| it 'labels/project_labels.json' do
get :index, params: { get :index, params: {
namespace_id: group, namespace_id: group,
project_id: project project_id: project
......
...@@ -42,19 +42,19 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont ...@@ -42,19 +42,19 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont
remove_repository(project) remove_repository(project)
end end
it 'merge_requests/merge_request_of_current_user.html' do |example| it 'merge_requests/merge_request_of_current_user.html' do
merge_request.update(author: admin) merge_request.update(author: admin)
render_merge_request(example.description, merge_request) render_merge_request(example.description, merge_request)
end end
it 'merge_requests/merge_request_with_task_list.html' do |example| it 'merge_requests/merge_request_with_task_list.html' do
create(:ci_build, :pending, pipeline: pipeline) create(:ci_build, :pending, pipeline: pipeline)
render_merge_request(example.description, merge_request) render_merge_request(example.description, merge_request)
end end
it 'merge_requests/merged_merge_request.html' do |example| it 'merge_requests/merged_merge_request.html' do
expect_next_instance_of(MergeRequest) do |merge_request| expect_next_instance_of(MergeRequest) do |merge_request|
allow(merge_request).to receive(:source_branch_exists?).and_return(true) allow(merge_request).to receive(:source_branch_exists?).and_return(true)
allow(merge_request).to receive(:can_remove_source_branch?).and_return(true) allow(merge_request).to receive(:can_remove_source_branch?).and_return(true)
...@@ -62,28 +62,28 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont ...@@ -62,28 +62,28 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont
render_merge_request(example.description, merged_merge_request) render_merge_request(example.description, merged_merge_request)
end end
it 'merge_requests/diff_comment.html' do |example| it 'merge_requests/diff_comment.html' do
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request) create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
create(:note_on_merge_request, author: admin, project: project, noteable: merge_request) create(:note_on_merge_request, author: admin, project: project, noteable: merge_request)
render_merge_request(example.description, merge_request) render_merge_request(example.description, merge_request)
end end
it 'merge_requests/merge_request_with_comment.html' do |example| it 'merge_requests/merge_request_with_comment.html' do
create(:note_on_merge_request, author: admin, project: project, noteable: merge_request, note: '- [ ] Task List Item') create(:note_on_merge_request, author: admin, project: project, noteable: merge_request, note: '- [ ] Task List Item')
render_merge_request(example.description, merge_request) render_merge_request(example.description, merge_request)
end end
it 'merge_requests/discussions.json' do |example| it 'merge_requests/discussions.json' do
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request) create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
render_discussions_json(merge_request, example.description) render_discussions_json(merge_request, example.description)
end end
it 'merge_requests/diff_discussion.json' do |example| it 'merge_requests/diff_discussion.json' do
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request) create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
render_discussions_json(merge_request, example.description) render_discussions_json(merge_request, example.description)
end end
it 'merge_requests/resolved_diff_discussion.json' do |example| it 'merge_requests/resolved_diff_discussion.json' do
note = create(:discussion_note_on_merge_request, :resolved, project: project, author: admin, position: position, noteable: merge_request) note = create(:discussion_note_on_merge_request, :resolved, project: project, author: admin, position: position, noteable: merge_request)
create(:system_note, project: project, author: admin, noteable: merge_request, discussion_id: note.discussion.id) create(:system_note, project: project, author: admin, noteable: merge_request, discussion_id: note.discussion.id)
...@@ -106,7 +106,7 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont ...@@ -106,7 +106,7 @@ describe Projects::MergeRequestsController, '(JavaScript fixtures)', type: :cont
) )
end end
it 'merge_requests/image_diff_discussion.json' do |example| it 'merge_requests/image_diff_discussion.json' do
create(:diff_note_on_merge_request, project: project, noteable: merge_request2, position: image_position) create(:diff_note_on_merge_request, project: project, noteable: merge_request2, position: image_position)
render_discussions_json(merge_request2, example.description) render_discussions_json(merge_request2, example.description)
end end
......
...@@ -34,7 +34,7 @@ describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)', type ...@@ -34,7 +34,7 @@ describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)', type
remove_repository(project) remove_repository(project)
end end
it 'merge_request_diffs/with_commit.json' do |example| it 'merge_request_diffs/with_commit.json' do
# Create a user that matches the selected commit author # Create a user that matches the selected commit author
# This is so that the "author" information will be populated # This is so that the "author" information will be populated
create(:user, email: selected_commit.author_email, name: selected_commit.author_name) create(:user, email: selected_commit.author_email, name: selected_commit.author_name)
...@@ -42,13 +42,13 @@ describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)', type ...@@ -42,13 +42,13 @@ describe Projects::MergeRequests::DiffsController, '(JavaScript fixtures)', type
render_merge_request(example.description, merge_request, commit_id: selected_commit.sha) render_merge_request(example.description, merge_request, commit_id: selected_commit.sha)
end end
it 'merge_request_diffs/inline_changes_tab_with_comments.json' do |example| it 'merge_request_diffs/inline_changes_tab_with_comments.json' do
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request) create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
create(:note_on_merge_request, author: admin, project: project, noteable: merge_request) create(:note_on_merge_request, author: admin, project: project, noteable: merge_request)
render_merge_request(example.description, merge_request) render_merge_request(example.description, merge_request)
end end
it 'merge_request_diffs/parallel_changes_tab_with_comments.json' do |example| it 'merge_request_diffs/parallel_changes_tab_with_comments.json' do
create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request) create(:diff_note_on_merge_request, project: project, author: admin, position: position, noteable: merge_request)
create(:note_on_merge_request, author: admin, project: project, noteable: merge_request) create(:note_on_merge_request, author: admin, project: project, noteable: merge_request)
render_merge_request(example.description, merge_request, view: 'parallel') render_merge_request(example.description, merge_request, view: 'parallel')
......
...@@ -21,7 +21,7 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: : ...@@ -21,7 +21,7 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :
sign_in(admin) sign_in(admin)
end end
it 'pipeline_schedules/edit.html' do |example| it 'pipeline_schedules/edit.html' do
get :edit, params: { get :edit, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
...@@ -31,7 +31,7 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: : ...@@ -31,7 +31,7 @@ describe Projects::PipelineSchedulesController, '(JavaScript fixtures)', type: :
expect(response).to be_success expect(response).to be_success
end end
it 'pipeline_schedules/edit_with_variables.html' do |example| it 'pipeline_schedules/edit_with_variables.html' do
get :edit, params: { get :edit, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project, project_id: project,
......
...@@ -23,7 +23,7 @@ describe Projects::PipelinesController, '(JavaScript fixtures)', type: :controll ...@@ -23,7 +23,7 @@ describe Projects::PipelinesController, '(JavaScript fixtures)', type: :controll
sign_in(admin) sign_in(admin)
end end
it 'pipelines/pipelines.json' do |example| it 'pipelines/pipelines.json' do
get :index, params: { get :index, params: {
namespace_id: namespace, namespace_id: namespace,
project_id: project project_id: project
......
...@@ -28,7 +28,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -28,7 +28,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
end end
describe ProjectsController, '(JavaScript fixtures)', type: :controller do describe ProjectsController, '(JavaScript fixtures)', type: :controller do
it 'projects/dashboard.html' do |example| it 'projects/dashboard.html' do
get :show, params: { get :show, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
id: project id: project
...@@ -37,7 +37,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -37,7 +37,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
expect(response).to be_success expect(response).to be_success
end end
it 'projects/overview.html' do |example| it 'projects/overview.html' do
get :show, params: { get :show, params: {
namespace_id: project_with_repo.namespace.to_param, namespace_id: project_with_repo.namespace.to_param,
id: project_with_repo id: project_with_repo
...@@ -46,7 +46,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -46,7 +46,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
expect(response).to be_success expect(response).to be_success
end end
it 'projects/edit.html' do |example| it 'projects/edit.html' do
get :edit, params: { get :edit, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
id: project id: project
...@@ -57,7 +57,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -57,7 +57,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
end end
describe Projects::Settings::CiCdController, '(JavaScript fixtures)', type: :controller do describe Projects::Settings::CiCdController, '(JavaScript fixtures)', type: :controller do
it 'projects/ci_cd_settings.html' do |example| it 'projects/ci_cd_settings.html' do
get :show, params: { get :show, params: {
namespace_id: project.namespace.to_param, namespace_id: project.namespace.to_param,
project_id: project project_id: project
...@@ -66,7 +66,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do ...@@ -66,7 +66,7 @@ describe 'Projects (JavaScript fixtures)', type: :controller do
expect(response).to be_success expect(response).to be_success
end end
it 'projects/ci_cd_settings_with_variables.html' do |example| it 'projects/ci_cd_settings_with_variables.html' do
create(:ci_variable, project: project_variable_populated) create(:ci_variable, project: project_variable_populated)
create(:ci_variable, project: project_variable_populated) create(:ci_variable, project: project_variable_populated)
......
...@@ -22,7 +22,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle ...@@ -22,7 +22,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle
remove_repository(project) remove_repository(project)
end end
it 'services/prometheus/prometheus_service.html' do |example| it 'services/prometheus/prometheus_service.html' do
get :edit, params: { get :edit, params: {
namespace_id: namespace, namespace_id: namespace,
project_id: project, project_id: project,
......
...@@ -17,27 +17,27 @@ describe 'Raw files', '(JavaScript fixtures)' do ...@@ -17,27 +17,27 @@ describe 'Raw files', '(JavaScript fixtures)' do
remove_repository(project) remove_repository(project)
end end
it 'blob/balsamiq/test.bmpr' do |example| it 'blob/balsamiq/test.bmpr' do
@blob = project.repository.blob_at('b89b56d79', 'files/images/balsamiq.bmpr') @blob = project.repository.blob_at('b89b56d79', 'files/images/balsamiq.bmpr')
end end
it 'blob/notebook/basic.json' do |example| it 'blob/notebook/basic.json' do
@blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb') @blob = project.repository.blob_at('6d85bb69', 'files/ipython/basic.ipynb')
end end
it 'blob/notebook/worksheets.json' do |example| it 'blob/notebook/worksheets.json' do
@blob = project.repository.blob_at('6d85bb69', 'files/ipython/worksheets.ipynb') @blob = project.repository.blob_at('6d85bb69', 'files/ipython/worksheets.ipynb')
end end
it 'blob/notebook/math.json' do |example| it 'blob/notebook/math.json' do
@blob = project.repository.blob_at('93ee732', 'files/ipython/math.ipynb') @blob = project.repository.blob_at('93ee732', 'files/ipython/math.ipynb')
end end
it 'blob/pdf/test.pdf' do |example| it 'blob/pdf/test.pdf' do
@blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf') @blob = project.repository.blob_at('e774ebd33', 'files/pdf/test.pdf')
end end
......
...@@ -9,7 +9,7 @@ describe SearchController, '(JavaScript fixtures)', type: :controller do ...@@ -9,7 +9,7 @@ describe SearchController, '(JavaScript fixtures)', type: :controller do
clean_frontend_fixtures('search/') clean_frontend_fixtures('search/')
end end
it 'search/show.html' do |example| it 'search/show.html' do
get :show get :show
expect(response).to be_success expect(response).to be_success
......
...@@ -22,7 +22,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle ...@@ -22,7 +22,7 @@ describe Projects::ServicesController, '(JavaScript fixtures)', type: :controlle
remove_repository(project) remove_repository(project)
end end
it 'services/edit_service.html' do |example| it 'services/edit_service.html' do
get :edit, params: { get :edit, params: {
namespace_id: namespace, namespace_id: namespace,
project_id: project, project_id: project,
......
...@@ -16,7 +16,7 @@ describe 'Sessions (JavaScript fixtures)' do ...@@ -16,7 +16,7 @@ describe 'Sessions (JavaScript fixtures)' do
set_devise_mapping(context: @request) set_devise_mapping(context: @request)
end end
it 'sessions/new.html' do |example| it 'sessions/new.html' do
get :new get :new
expect(response).to be_success expect(response).to be_success
......
...@@ -23,7 +23,7 @@ describe SnippetsController, '(JavaScript fixtures)', type: :controller do ...@@ -23,7 +23,7 @@ describe SnippetsController, '(JavaScript fixtures)', type: :controller do
remove_repository(project) remove_repository(project)
end end
it 'snippets/show.html' do |example| it 'snippets/show.html' do
create(:discussion_note_on_snippet, noteable: snippet, project: project, author: admin, note: '- [ ] Task List Item') create(:discussion_note_on_snippet, noteable: snippet, project: project, author: admin, note: '- [ ] Task List Item')
get(:show, params: { id: snippet.to_param }) get(:show, params: { id: snippet.to_param })
......
...@@ -26,7 +26,7 @@ describe 'Todos (JavaScript fixtures)' do ...@@ -26,7 +26,7 @@ describe 'Todos (JavaScript fixtures)' do
sign_in(admin) sign_in(admin)
end end
it 'todos/todos.html' do |example| it 'todos/todos.html' do
get :index get :index
expect(response).to be_success expect(response).to be_success
...@@ -40,7 +40,7 @@ describe 'Todos (JavaScript fixtures)' do ...@@ -40,7 +40,7 @@ describe 'Todos (JavaScript fixtures)' do
sign_in(admin) sign_in(admin)
end end
it 'todos/todos.json' do |example| it 'todos/todos.json' do
post :create, params: { post :create, params: {
namespace_id: namespace, namespace_id: namespace,
project_id: project, project_id: project,
......
...@@ -18,7 +18,7 @@ context 'U2F' do ...@@ -18,7 +18,7 @@ context 'U2F' do
set_devise_mapping(context: @request) set_devise_mapping(context: @request)
end end
it 'u2f/authenticate.html' do |example| it 'u2f/authenticate.html' do
allow(controller).to receive(:find_user).and_return(user) allow(controller).to receive(:find_user).and_return(user)
post :create, params: { user: { login: user.username, password: user.password } } post :create, params: { user: { login: user.username, password: user.password } }
...@@ -35,7 +35,7 @@ context 'U2F' do ...@@ -35,7 +35,7 @@ context 'U2F' do
allow_any_instance_of(Profiles::TwoFactorAuthsController).to receive(:build_qr_code).and_return('qrcode:blackandwhitesquares') allow_any_instance_of(Profiles::TwoFactorAuthsController).to receive(:build_qr_code).and_return('qrcode:blackandwhitesquares')
end end
it 'u2f/register.html' do |example| it 'u2f/register.html' do
get :show get :show
expect(response).to be_success expect(response).to be_success
......
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