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/models/integrations/harbor_spec.rb')
-rw-r--r--spec/models/integrations/harbor_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/models/integrations/harbor_spec.rb b/spec/models/integrations/harbor_spec.rb
index 4a6eb27d63a..9e3d4b524a6 100644
--- a/spec/models/integrations/harbor_spec.rb
+++ b/spec/models/integrations/harbor_spec.rb
@@ -67,6 +67,16 @@ RSpec.describe Integrations::Harbor do
harbor_integration.update!(active: false)
expect(harbor_integration.ci_variables).to match_array([])
end
+
+ context 'with robot username' do
+ it 'returns username variable with $$' do
+ harbor_integration.username = 'robot$project+user'
+
+ expect(harbor_integration.ci_variables).to include(
+ { key: 'HARBOR_USERNAME', value: 'robot$$project+user' }
+ )
+ end
+ end
end
describe 'before_validation :reset_username_and_password' do