Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 12:08:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-27 12:08:28 +0300
commit6ac4a6713ed3196af899011f7e18658e16ebaac0 (patch)
treec60237cb5203d171481b765d31bfead080d063cf /spec/migrations/nullify_users_role_spec.rb
parentd2b64c37bdef067656fdc8deb4728a2fbc6c2729 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/migrations/nullify_users_role_spec.rb')
-rw-r--r--spec/migrations/nullify_users_role_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/migrations/nullify_users_role_spec.rb b/spec/migrations/nullify_users_role_spec.rb
index 487d84e2a35..b11929ef76f 100644
--- a/spec/migrations/nullify_users_role_spec.rb
+++ b/spec/migrations/nullify_users_role_spec.rb
@@ -18,16 +18,16 @@ describe NullifyUsersRole do
it 'nullifies the role of the user with updated_at < 2019-11-05 12:08:00 and a role of 0' do
expect(users.where(role: nil).count).to eq(1)
- expect(users.where(role: nil).first.email).to eq('1')
+ expect(users.find_by(role: nil).email).to eq('1')
end
it 'leaves the user with role of 1' do
expect(users.where(role: 1).count).to eq(1)
- expect(users.where(role: 1).first.email).to eq('2')
+ expect(users.find_by(role: 1).email).to eq('2')
end
it 'leaves the user with updated_at > 2019-11-05 12:08:00' do
expect(users.where(role: 0).count).to eq(1)
- expect(users.where(role: 0).first.email).to eq('3')
+ expect(users.find_by(role: 0).email).to eq('3')
end
end