diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2017-02-21 12:50:05 +0530 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2017-02-24 16:50:21 +0530 |
commit | 53aa043724a0395a2f95f41b8f3fb4c308691874 (patch) | |
tree | 9a495acefdab3f45f3422d09177a0168c0906cc7 | |
parent | 6fdb17cbbe5dc70d18f50e9d131ab70407976a71 (diff) | |
download | gitlab-ce-53aa043724a0395a2f95f41b8f3fb4c308691874.tar.gz |
Fix specs for the ghost user feature.12726-preserve-issues-after-deleting-users
-rw-r--r-- | spec/models/abuse_report_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/user_spec.rb | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/spec/models/abuse_report_spec.rb b/spec/models/abuse_report_spec.rb index c4486a32082..4e71597521d 100644 --- a/spec/models/abuse_report_spec.rb +++ b/spec/models/abuse_report_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' RSpec.describe AbuseReport, type: :model do subject { create(:abuse_report) } - let(:user) { create(:user) } + let(:user) { create(:admin) } it { expect(subject).to be_valid } diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 9e2b1c9290f..6356f8b6c92 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -211,13 +211,15 @@ describe User, models: true do describe 'ghost users' do it 'does not allow a non-blocked ghost user' do - user = build(:user, :ghost, state: :active) + user = build(:user, :ghost) + user.state = 'active' expect(user).to be_invalid end it 'allows a blocked ghost user' do - user = build(:user, :ghost, state: :blocked) + user = build(:user, :ghost) + user.state = 'blocked' expect(user).to be_valid end |