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:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 18:10:47 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 18:10:47 +0300
commit6f18a8d0b00eae84d262dff137fddd9639f3c52a (patch)
treef6297c5a843ee6096e996f58c768e80232e2b610 /spec/helpers
parentc62dd5ae440db9ad4696000a863fbcb53fe83498 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/jira_connect_helper_spec.rb16
1 files changed, 15 insertions, 1 deletions
diff --git a/spec/helpers/jira_connect_helper_spec.rb b/spec/helpers/jira_connect_helper_spec.rb
index 4362f2906e1..455120f86d5 100644
--- a/spec/helpers/jira_connect_helper_spec.rb
+++ b/spec/helpers/jira_connect_helper_spec.rb
@@ -9,6 +9,7 @@ RSpec.describe JiraConnectHelper, feature_category: :integrations do
let(:user) { create(:user) }
let(:client_id) { '123' }
+ let(:enable_public_keys_storage) { false }
before do
stub_application_setting(jira_connect_application_key: client_id)
@@ -19,7 +20,8 @@ RSpec.describe JiraConnectHelper, feature_category: :integrations do
context 'user is not logged in' do
before do
allow(view).to receive(:current_user).and_return(nil)
- allow(Gitlab).to receive_message_chain('config.gitlab.url') { 'http://test.host' }
+ allow(Gitlab.config.gitlab).to receive(:url).and_return('http://test.host')
+ allow(Gitlab.config.jira_connect).to receive(:enable_public_keys_storage).and_return(enable_public_keys_storage)
end
it 'includes Jira Connect app attributes' do
@@ -98,6 +100,18 @@ RSpec.describe JiraConnectHelper, feature_category: :integrations do
it 'assigns gitlab_user_path to nil' do
expect(subject[:gitlab_user_path]).to be_nil
end
+
+ it 'assignes public_key_storage_enabled to false' do
+ expect(subject[:public_key_storage_enabled]).to eq(false)
+ end
+
+ context 'when public_key_storage is enabled' do
+ let(:enable_public_keys_storage) { true }
+
+ it 'assignes public_key_storage_enabled to true' do
+ expect(subject[:public_key_storage_enabled]).to eq(true)
+ end
+ end
end
context 'user is logged in' do