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.rb11
1 files changed, 7 insertions, 4 deletions
diff --git a/spec/models/integrations/harbor_spec.rb b/spec/models/integrations/harbor_spec.rb
index 9ab37a92e89..b4580028112 100644
--- a/spec/models/integrations/harbor_spec.rb
+++ b/spec/models/integrations/harbor_spec.rb
@@ -70,7 +70,7 @@ RSpec.describe Integrations::Harbor do
end
context 'ci variables' do
- let(:harbor_integration) { create(:harbor_integration) }
+ let(:harbor_integration) { build_stubbed(:harbor_integration) }
it 'returns vars when harbor_integration is activated' do
ci_vars = [
@@ -85,9 +85,12 @@ RSpec.describe Integrations::Harbor do
expect(harbor_integration.ci_variables).to match_array(ci_vars)
end
- it 'returns [] when harbor_integration is inactive' do
- harbor_integration.update!(active: false)
- expect(harbor_integration.ci_variables).to match_array([])
+ context 'when harbor_integration is inactive' do
+ let(:harbor_integration) { build_stubbed(:harbor_integration, active: false) }
+
+ it 'returns []' do
+ expect(harbor_integration.ci_variables).to match_array([])
+ end
end
context 'with robot username' do