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>2020-06-04 03:08:17 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-06-04 03:08:17 +0300
commit340fd2966e6565a549f8e611b25d2525fc6929d1 (patch)
treebfe8876fe6f2a7c78b9e49feec0bf80d8d45bd52 /spec/tasks
parentfc92738a0245f1be88250448bebd9c20e9849444 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tasks')
-rw-r--r--spec/tasks/gitlab/container_registry_rake_spec.rb15
1 files changed, 13 insertions, 2 deletions
diff --git a/spec/tasks/gitlab/container_registry_rake_spec.rb b/spec/tasks/gitlab/container_registry_rake_spec.rb
index 41fc348aa24..181d5c8b7c8 100644
--- a/spec/tasks/gitlab/container_registry_rake_spec.rb
+++ b/spec/tasks/gitlab/container_registry_rake_spec.rb
@@ -16,10 +16,21 @@ describe 'gitlab:container_registry namespace rake tasks' do
stub_container_registry_config(enabled: true, api_url: api_url)
end
+ subject { run_rake_task('gitlab:container_registry:configure') }
+
shared_examples 'invalid config' do
it 'does not update the application settings' do
- expect { run_rake_task('gitlab:container_registry:configure') }
- .to raise_error(/Registry is not enabled or registry api url is not present./)
+ expect(application_settings).not_to receive(:update!)
+
+ subject
+ end
+
+ it 'does not raise an error' do
+ expect { subject }.not_to raise_error
+ end
+
+ it 'prints a warning message' do
+ expect { subject }.to output(/Registry is not enabled or registry api url is not present./).to_stdout
end
end