diff options
author | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-20 11:48:23 +0200 |
---|---|---|
committer | Grzegorz Bizon <grzesiek.bizon@gmail.com> | 2017-07-20 11:48:23 +0200 |
commit | 54efa041d70707eb28326bb23220ebe8d6efb8aa (patch) | |
tree | 63b1bc838861f2393b5bc283778299e4cf96a70f /spec/controllers/application_controller_spec.rb | |
parent | bb67b4749b5b4c62d4235c90dc0320967f850cdd (diff) | |
parent | 445cd22c72ca6fbfdcf18d67fa859c4b5b9e2a6c (diff) | |
download | gitlab-ce-54efa041d70707eb28326bb23220ebe8d6efb8aa.tar.gz |
Merge branch 'master' into backstage/gb/migrate-stages-statuses
* master: (319 commits)
remove redundant changelog entries
Merge branch '24570-use-re2-for-user-supplied-regexp-9-3' into 'security-9-3'
Merge branch '33303-404-for-unauthorized-project' into 'security-9-3'
Merge branch '33359-pers-snippet-files-location' into 'security-9-3'
Merge branch 'bvl-remove-appearance-symlink' into 'security-9-3'
Hide description about protected branches to non-member
Update CHANGELOG.md for 9.0.11
Update CHANGELOG.md for 9.1.8
Update CHANGELOG.md for 8.17.7
Update CHANGELOG.md for 9.2.8
Update CHANGELOG.md for 9.3.8
Respect blockquote line breaks in markdown
35209 Add wip message to new navigation preference section
Add github imported projects count to usage data
Add versions to Prometheus metrics doc
Add Bulgarian translations of Pipeline Schedules
Add Esperanto translations of Pipeline Schedules
Add Traditional Chinese in HongKong translations of Pipeline Schedules
Add Simplified Chinese translations of Pipeline Schedules
Resolve "Clarify k8s service keys"
...
Conflicts:
db/schema.rb
Diffstat (limited to 'spec/controllers/application_controller_spec.rb')
-rw-r--r-- | spec/controllers/application_controller_spec.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index a2720c9b81e..1641bddea11 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -30,6 +30,15 @@ describe ApplicationController do expect(controller).not_to receive(:redirect_to) controller.send(:check_password_expiration) end + + it 'does not redirect if the user is over their password expiry but sign-in is disabled' do + stub_application_setting(password_authentication_enabled: false) + user.password_expires_at = Time.new(2002) + allow(controller).to receive(:current_user).and_return(user) + expect(controller).not_to receive(:redirect_to) + + controller.send(:check_password_expiration) + end end describe "#authenticate_user_from_token!" do |