diff options
author | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
---|---|---|
committer | Job van der Voort <jobvandervoort@gmail.com> | 2015-04-21 17:21:51 +0300 |
commit | a8e93b7f51d968c1380ed210499869b62b07fd15 (patch) | |
tree | c864e80dfd9cf4f83fcede678acc986e3a125bf5 /spec/controllers/application_controller_spec.rb | |
parent | 0625b15a481b3a3edd88110b3c18031ad9068d2f (diff) |
Version 7.10.0.rc5v7.10.0.rc5
Diffstat (limited to 'spec/controllers/application_controller_spec.rb')
-rw-r--r-- | spec/controllers/application_controller_spec.rb | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb deleted file mode 100644 index 186239d3096..00000000000 --- a/spec/controllers/application_controller_spec.rb +++ /dev/null @@ -1,33 +0,0 @@ -require 'spec_helper' - -describe ApplicationController do - describe '#check_password_expiration' do - let(:user) { create(:user) } - let(:controller) { ApplicationController.new } - - it 'should redirect if the user is over their password expiry' do - user.password_expires_at = Time.new(2002) - expect(user.ldap_user?).to be_falsey - allow(controller).to receive(:current_user).and_return(user) - expect(controller).to receive(:redirect_to) - expect(controller).to receive(:new_profile_password_path) - controller.send(:check_password_expiration) - end - - it 'should not redirect if the user is under their password expiry' do - user.password_expires_at = Time.now + 20010101 - expect(user.ldap_user?).to be_falsey - allow(controller).to receive(:current_user).and_return(user) - expect(controller).not_to receive(:redirect_to) - controller.send(:check_password_expiration) - end - - it 'should not redirect if the user is over their password expiry but they are an ldap user' do - user.password_expires_at = Time.new(2002) - allow(user).to receive(:ldap_user?).and_return(true) - allow(controller).to receive(:current_user).and_return(user) - expect(controller).not_to receive(:redirect_to) - controller.send(:check_password_expiration) - end - end -end |