diff options
author | Ash Furrow <ash@ashfurrow.com> | 2017-04-23 04:43:42 +0200 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-23 04:43:42 +0200 |
commit | 723f25a9999251b0c3f45c57aa88afa83f315b2d (patch) | |
tree | 9b25ee6b6dd7519a95302bbab57149b3263e083d /spec | |
parent | 59b1de0bcf39473106e5380c129d7436be1ad89a (diff) |
Admin UI for confirming users (#2245)
* Shows confirmed status in list. * Adds ability to confirm users in admin UI. * Added new english translations. * Addresses feedback from #2245. * More feedback.
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/user_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 846a206ec..3dd50a701 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -98,6 +98,18 @@ RSpec.describe User, type: :model do end end + describe '#confirmed?' do + it 'returns true when a confirmed_at is set' do + user = Fabricate.build(:user, confirmed_at: Time.now.utc) + expect(user.confirmed?).to be true + end + + it 'returns false if a confirmed_at is nil' do + user = Fabricate.build(:user, confirmed_at: nil) + expect(user.confirmed?).to be false + end + end + describe 'whitelist' do around(:each) do |example| old_whitelist = Rails.configuration.x.email_whitelist |