Commit 8a31f66b authored by Michael Kozono's avatar Michael Kozono

Merge branch 'rails-save-bang-features-dashboard' into 'master'

Fix Rails/SaveBang offenses in spec/features/dashboard

See merge request gitlab-org/gitlab!57898
parents 43863343 273325c4
......@@ -177,10 +177,6 @@ Rails/SaveBang:
- 'spec/controllers/sent_notifications_controller_spec.rb'
- 'spec/controllers/sessions_controller_spec.rb'
- 'spec/factories_spec.rb'
- 'spec/features/dashboard/datetime_on_tooltips_spec.rb'
- 'spec/features/dashboard/issuables_counter_spec.rb'
- 'spec/features/dashboard/project_member_activity_index_spec.rb'
- 'spec/features/dashboard/projects_spec.rb'
- 'spec/frontend/fixtures/issues.rb'
- 'spec/frontend/fixtures/merge_requests.rb'
- 'spec/graphql/mutations/merge_requests/set_locked_spec.rb'
......
---
title: Fix Rails/SaveBang rubocop offenses in spec/features/dashboard
merge_request: 57898
author: Abdul Wadood @abdulwd
type: fixed
......@@ -13,7 +13,7 @@ RSpec.describe 'Tooltips on .timeago dates', :js do
context 'on the activity tab' do
before do
Event.create( project: project, author_id: user.id, action: :joined,
Event.create!( project: project, author_id: user.id, action: :joined,
updated_at: created_date, created_at: created_date)
sign_in user
......
......@@ -10,7 +10,7 @@ RSpec.describe 'Navigation bar counter', :use_clean_rails_memory_store_caching d
before do
issue.assignees = [user]
merge_request.update(assignees: [user])
merge_request.update!(assignees: [user])
sign_in(user)
end
......@@ -35,7 +35,7 @@ RSpec.describe 'Navigation bar counter', :use_clean_rails_memory_store_caching d
expect_counters('merge_requests', '1')
merge_request.update(assignees: [])
merge_request.update!(assignees: [])
user.invalidate_cache_counts
......
......@@ -11,7 +11,7 @@ RSpec.describe 'Project member activity', :js do
end
def visit_activities_and_wait_with_event(event_type)
Event.create(project: project, author_id: user.id, action: event_type)
Event.create!(project: project, author_id: user.id, action: event_type)
visit activity_project_path(project)
wait_for_requests
end
......
......@@ -41,7 +41,7 @@ RSpec.describe 'Dashboard Projects' do
expect(page).to have_content('Developer')
end
project.members.last.update(access_level: 40)
project.members.last.update!(access_level: 40)
visit dashboard_projects_path
......@@ -183,7 +183,7 @@ RSpec.describe 'Dashboard Projects' do
let(:guest_user) { create(:user) }
before do
project.update(public_builds: false)
project.update!(public_builds: false)
project.add_guest(guest_user)
sign_in(guest_user)
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