Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'spec/lib/gitlab/application_context_spec.rb')
-rw-r--r--spec/lib/gitlab/application_context_spec.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/spec/lib/gitlab/application_context_spec.rb b/spec/lib/gitlab/application_context_spec.rb
index 8b2a228b935..58d462aa27f 100644
--- a/spec/lib/gitlab/application_context_spec.rb
+++ b/spec/lib/gitlab/application_context_spec.rb
@@ -44,7 +44,7 @@ RSpec.describe Gitlab::ApplicationContext do
describe '.push' do
it 'passes the expected context on to labkit' do
fake_proc = duck_type(:call)
- expected_context = { user: fake_proc, client_id: fake_proc }
+ expected_context = { user: fake_proc, user_id: fake_proc, client_id: fake_proc }
expect(Labkit::Context).to receive(:push).with(expected_context)
@@ -108,14 +108,16 @@ RSpec.describe Gitlab::ApplicationContext do
context = described_class.new(user: -> { user }, project: -> { project }, namespace: -> { subgroup })
expect(result(context))
- .to include(user: user.username, project: project.full_path, root_namespace: namespace.full_path)
+ .to include(user: user.username, user_id: user.id, project: project.full_path,
+ root_namespace: namespace.full_path)
end
it 'correctly loads the expected values when passed directly' do
context = described_class.new(user: user, project: project, namespace: subgroup)
expect(result(context))
- .to include(user: user.username, project: project.full_path, root_namespace: namespace.full_path)
+ .to include(user: user.username, user_id: user.id, project: project.full_path,
+ root_namespace: namespace.full_path)
end
it 'falls back to a projects namespace when a project is passed but no namespace' do