diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-02 13:43:06 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-09 16:13:08 +0300 |
commit | 4ee08b77bc5ae11553d59c182ea8292b77699115 (patch) | |
tree | 3aac1871cd8dcefc88d52f11dcacbf238b2340a9 /spec/features/projects | |
parent | 612f5e63b3cf76c354e50f4aa6c4163e5465b115 (diff) |
Updates from `rubocop -a`
Diffstat (limited to 'spec/features/projects')
8 files changed, 12 insertions, 14 deletions
diff --git a/spec/features/projects/files/user_browses_files_spec.rb b/spec/features/projects/files/user_browses_files_spec.rb index 41f6c52fb8a..9b1395d5e0a 100644 --- a/spec/features/projects/files/user_browses_files_spec.rb +++ b/spec/features/projects/files/user_browses_files_spec.rb @@ -147,8 +147,6 @@ describe "User browses files" do page.within(".tree-table") do click_link("README.md") end - - # rubocop:disable Lint/Void # Test the full URLs of links instead of relative paths by `have_link(text: "...", href: "...")`. find("a", text: /^empty$/)["href"] == project_blob_url(project, "markdown/d/README.md") # rubocop:enable Lint/Void diff --git a/spec/features/projects/jobs/permissions_spec.rb b/spec/features/projects/jobs/permissions_spec.rb index e9588daf37d..e639f0cf82e 100644 --- a/spec/features/projects/jobs/permissions_spec.rb +++ b/spec/features/projects/jobs/permissions_spec.rb @@ -90,7 +90,7 @@ describe 'Project Jobs Permissions' do before do archive = fixture_file_upload('spec/fixtures/ci_build_artifacts.zip') - job.update_attributes(legacy_artifacts_file: archive) + job.update(legacy_artifacts_file: archive) end context 'when public access for jobs is disabled' do diff --git a/spec/features/projects/jobs_spec.rb b/spec/features/projects/jobs_spec.rb index c742eb79392..35b1c46ecf6 100644 --- a/spec/features/projects/jobs_spec.rb +++ b/spec/features/projects/jobs_spec.rb @@ -187,7 +187,7 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do context "Download artifacts" do before do - job.update_attributes(legacy_artifacts_file: artifacts_file) + job.update(legacy_artifacts_file: artifacts_file) visit project_job_path(project, job) end @@ -198,8 +198,8 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do context 'Artifacts expire date' do before do - job.update_attributes(legacy_artifacts_file: artifacts_file, - artifacts_expire_at: expire_at) + job.update(legacy_artifacts_file: artifacts_file, + artifacts_expire_at: expire_at) visit project_job_path(project, job) end @@ -530,14 +530,14 @@ describe 'Jobs', :clean_gitlab_redis_shared_state do describe "GET /:project/jobs/:id/download" do before do - job.update_attributes(legacy_artifacts_file: artifacts_file) + job.update(legacy_artifacts_file: artifacts_file) visit project_job_path(project, job) click_link 'Download' end context "Build from other project" do before do - job2.update_attributes(legacy_artifacts_file: artifacts_file) + job2.update(legacy_artifacts_file: artifacts_file) visit download_project_job_artifacts_path(project, job2) end diff --git a/spec/features/projects/members/user_requests_access_spec.rb b/spec/features/projects/members/user_requests_access_spec.rb index 35d6ac1c650..5599cc9bf1b 100644 --- a/spec/features/projects/members/user_requests_access_spec.rb +++ b/spec/features/projects/members/user_requests_access_spec.rb @@ -11,7 +11,7 @@ describe 'Projects > Members > User requests access', :js do end it 'request access feature is disabled' do - project.update_attributes(request_access_enabled: false) + project.update(request_access_enabled: false) visit project_path(project) expect(page).not_to have_content 'Request Access' diff --git a/spec/features/projects/pipelines/pipelines_spec.rb b/spec/features/projects/pipelines/pipelines_spec.rb index 9c165b17704..7d47e342e92 100644 --- a/spec/features/projects/pipelines/pipelines_spec.rb +++ b/spec/features/projects/pipelines/pipelines_spec.rb @@ -606,7 +606,7 @@ describe 'Pipelines', :js do describe 'user clicks the button' do context 'when project already has jobs_cache_index' do before do - project.update_attributes(jobs_cache_index: 1) + project.update(jobs_cache_index: 1) end it 'increments jobs_cache_index' do diff --git a/spec/features/projects/remote_mirror_spec.rb b/spec/features/projects/remote_mirror_spec.rb index 53a3f6f474b..97db4a2b8f2 100644 --- a/spec/features/projects/remote_mirror_spec.rb +++ b/spec/features/projects/remote_mirror_spec.rb @@ -13,7 +13,7 @@ describe 'Project remote mirror', :feature do context 'when last_error is present but last_update_at is not' do it 'renders error message without timstamp' do - remote_mirror.update_attributes(last_error: 'Some new error', last_update_at: nil) + remote_mirror.update(last_error: 'Some new error', last_update_at: nil) visit project_mirror_path(project) @@ -23,7 +23,7 @@ describe 'Project remote mirror', :feature do context 'when last_error and last_update_at are present' do it 'renders error message with timestamp' do - remote_mirror.update_attributes(last_error: 'Some new error', last_update_at: Time.now - 5.minutes) + remote_mirror.update(last_error: 'Some new error', last_update_at: Time.now - 5.minutes) visit project_mirror_path(project) diff --git a/spec/features/projects/services/user_activates_slack_notifications_spec.rb b/spec/features/projects/services/user_activates_slack_notifications_spec.rb index fae9ebd1bd6..727b1fe2d11 100644 --- a/spec/features/projects/services/user_activates_slack_notifications_spec.rb +++ b/spec/features/projects/services/user_activates_slack_notifications_spec.rb @@ -29,7 +29,7 @@ describe 'User activates Slack notifications' do context 'when service is already configured' do before do service.fields - service.update_attributes( + service.update( push_channel: 1, issue_channel: 2, merge_request_channel: 3, diff --git a/spec/features/projects/show/user_sees_deletion_failure_message_spec.rb b/spec/features/projects/show/user_sees_deletion_failure_message_spec.rb index aa23bef6fd8..d9d57298929 100644 --- a/spec/features/projects/show/user_sees_deletion_failure_message_spec.rb +++ b/spec/features/projects/show/user_sees_deletion_failure_message_spec.rb @@ -8,7 +8,7 @@ describe 'Projects > Show > User sees a deletion failure message' do end it 'shows error message if deletion for project fails' do - project.update_attributes(delete_error: "Something went wrong", pending_delete: false) + project.update(delete_error: "Something went wrong", pending_delete: false) visit project_path(project) |