diff options
author | Robert Speicher <rspeicher@gmail.com> | 2015-06-23 04:13:49 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-06-23 04:14:07 +0300 |
commit | dcfce8b1988af62806a8bcdfd38bc2dcc0b7cf4e (patch) | |
tree | d3d559bcecf001326ca86a4838ef1bf1d1803db6 /spec/models | |
parent | aedb546964cc6b6e456369bf17a3d917089f7017 (diff) |
Use alias_attribute to define User#two_factor_enabled
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/user_spec.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index df7085f1d66..cbba289578a 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -210,30 +210,6 @@ describe User do end end - describe '#two_factor_enabled' do - it 'returns two-factor authentication status' do - enabled = build_stubbed(:user, two_factor_enabled: true) - disabled = build_stubbed(:user) - - expect(enabled).to be_two_factor_enabled - expect(disabled).not_to be_two_factor_enabled - end - end - - describe '#two_factor_enabled=' do - it 'enables two-factor authentication' do - user = build_stubbed(:user, two_factor_enabled: false) - expect { user.two_factor_enabled = true }. - to change { user.two_factor_enabled? }.to(true) - end - - it 'disables two-factor authentication' do - user = build_stubbed(:user, two_factor_enabled: true) - expect { user.two_factor_enabled = false }. - to change { user.two_factor_enabled? }.to(false) - end - end - describe 'authentication token' do it "should have authentication token" do user = create(:user) |