summaryrefslogtreecommitdiff
path: root/spec/models/user_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-08-06 12:16:36 +0200
committerDouwe Maan <douwe@gitlab.com>2015-08-06 12:16:36 +0200
commit4f24eb2aa670877faeef0f486af00d74e007ad01 (patch)
tree3b8c9ccbe779050db829565910e8652392af4dcf /spec/models/user_spec.rb
parentc6799b0e1ecd1b7373f0ea23195e18c7ad5c199d (diff)
parentfff36a8b8965e4bddd8020caf5072e79bf131a74 (diff)
downloadgitlab-ce-merge-notifs.tar.gz
Merge branch 'master' into merge-notifsmerge-notifs
Diffstat (limited to 'spec/models/user_spec.rb')
-rw-r--r--spec/models/user_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index 76f16323e2f..876cfb1204a 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -57,6 +57,7 @@
# otp_backup_codes :text
# public_email :string(255) default(""), not null
# dashboard :integer default(0)
+# project_view :integer default(0)
#
require 'spec_helper'
@@ -183,6 +184,19 @@ describe User do
it { is_expected.to respond_to(:private_token) }
end
+ describe '#confirm' do
+ let(:user) { create(:user, confirmed_at: nil, unconfirmed_email: 'test@gitlab.com') }
+
+ it 'returns unconfirmed' do
+ expect(user.confirmed?).to be_falsey
+ end
+
+ it 'confirms a user' do
+ user.confirm!
+ expect(user.confirmed?).to be_truthy
+ end
+ end
+
describe '#to_reference' do
let(:user) { create(:user) }