summaryrefslogtreecommitdiff
path: root/spec/controllers/sessions_controller_spec.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 23:50:22 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-04-20 23:50:22 +0000
commit9dc93a4519d9d5d7be48ff274127136236a3adb3 (patch)
tree70467ae3692a0e35e5ea56bcb803eb512a10bedb /spec/controllers/sessions_controller_spec.rb
parent4b0f34b6d759d6299322b3a54453e930c6121ff0 (diff)
downloadgitlab-ce-9dc93a4519d9d5d7be48ff274127136236a3adb3.tar.gz
Add latest changes from gitlab-org/gitlab@13-11-stable-eev13.11.0-rc43
Diffstat (limited to 'spec/controllers/sessions_controller_spec.rb')
-rw-r--r--spec/controllers/sessions_controller_spec.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/controllers/sessions_controller_spec.rb b/spec/controllers/sessions_controller_spec.rb
index c31ba6fe156..abdafa2880a 100644
--- a/spec/controllers/sessions_controller_spec.rb
+++ b/spec/controllers/sessions_controller_spec.rb
@@ -86,7 +86,7 @@ RSpec.describe SessionsController do
post(:create, params: { user: { login: 'invalid', password: 'invalid' } })
expect(response)
- .to set_flash.now[:alert].to(/Invalid Login or password/)
+ .to set_flash.now[:alert].to(/Invalid login or password/)
end
end
@@ -348,7 +348,7 @@ RSpec.describe SessionsController do
otp_user_id: user.id
)
- expect(response).to set_flash.now[:alert].to(/Invalid Login or password/)
+ expect(response).to set_flash.now[:alert].to(/Invalid login or password/)
end
end
@@ -524,7 +524,7 @@ RSpec.describe SessionsController do
it 'sets the username and caller_id in the context' do
expect(controller).to receive(:destroy).and_wrap_original do |m, *args|
- expect(Labkit::Context.current.to_h)
+ expect(Gitlab::ApplicationContext.current)
.to include('meta.user' => user.username,
'meta.caller_id' => 'SessionsController#destroy')
@@ -538,9 +538,9 @@ RSpec.describe SessionsController do
context 'when not signed in' do
it 'sets the caller_id in the context' do
expect(controller).to receive(:new).and_wrap_original do |m, *args|
- expect(Labkit::Context.current.to_h)
+ expect(Gitlab::ApplicationContext.current)
.to include('meta.caller_id' => 'SessionsController#new')
- expect(Labkit::Context.current.to_h)
+ expect(Gitlab::ApplicationContext.current)
.not_to include('meta.user')
m.call(*args)
@@ -557,9 +557,9 @@ RSpec.describe SessionsController do
it 'sets the caller_id in the context' do
allow_any_instance_of(User).to receive(:lock_access!).and_wrap_original do |m, *args|
- expect(Labkit::Context.current.to_h)
+ expect(Gitlab::ApplicationContext.current)
.to include('meta.caller_id' => 'SessionsController#create')
- expect(Labkit::Context.current.to_h)
+ expect(Gitlab::ApplicationContext.current)
.not_to include('meta.user')
m.call(*args)