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:
authorTimothy Andrew <mail@timothyandrew.net>2017-02-21 10:20:05 +0300
committerTimothy Andrew <mail@timothyandrew.net>2017-02-24 14:20:21 +0300
commit53aa043724a0395a2f95f41b8f3fb4c308691874 (patch)
tree9a495acefdab3f45f3422d09177a0168c0906cc7 /spec/models/user_spec.rb
parent6fdb17cbbe5dc70d18f50e9d131ab70407976a71 (diff)
Fix specs for the ghost user feature.
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb6
1 files changed, 4 insertions, 2 deletions
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