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.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/models/integrations/harbor_spec.rb b/spec/models/integrations/harbor_spec.rb
index 9e3d4b524a6..5d8597969a1 100644
--- a/spec/models/integrations/harbor_spec.rb
+++ b/spec/models/integrations/harbor_spec.rb
@@ -19,6 +19,14 @@ RSpec.describe Integrations::Harbor do
it { is_expected.to allow_value('helloworld').for(:password) }
end
+ describe 'url' do
+ subject { build(:harbor_integration) }
+
+ it { is_expected.not_to allow_value('https://192.168.1.1').for(:url) }
+ it { is_expected.not_to allow_value('https://127.0.0.1').for(:url) }
+ it { is_expected.to allow_value('https://demo.goharbor.io').for(:url)}
+ end
+
describe '#fields' do
it 'returns custom fields' do
expect(harbor_integration.fields.pluck(:name)).to eq(%w[url project_name username password])