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>2022-07-20 18:40:28 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-20 18:40:28 +0300
commitb595cb0c1dec83de5bdee18284abe86614bed33b (patch)
tree8c3d4540f193c5ff98019352f554e921b3a41a72 /spec/requests/groups
parent2f9104a328fc8a4bddeaa4627b595166d24671d0 (diff)
Add latest changes from gitlab-org/gitlab@15-2-stable-eev15.2.0-rc42
Diffstat (limited to 'spec/requests/groups')
-rw-r--r--spec/requests/groups/harbor/artifacts_controller_spec.rb10
-rw-r--r--spec/requests/groups/harbor/repositories_controller_spec.rb65
-rw-r--r--spec/requests/groups/harbor/tags_controller_spec.rb10
3 files changed, 23 insertions, 62 deletions
diff --git a/spec/requests/groups/harbor/artifacts_controller_spec.rb b/spec/requests/groups/harbor/artifacts_controller_spec.rb
new file mode 100644
index 00000000000..ea9529119a6
--- /dev/null
+++ b/spec/requests/groups/harbor/artifacts_controller_spec.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Groups::Harbor::ArtifactsController do
+ it_behaves_like 'a harbor artifacts controller', anonymous_status_code: '404' do
+ let_it_be(:container) { create(:group) }
+ let_it_be(:harbor_integration) { create(:harbor_integration, group: container, project: nil) }
+ end
+end
diff --git a/spec/requests/groups/harbor/repositories_controller_spec.rb b/spec/requests/groups/harbor/repositories_controller_spec.rb
index 3e475dc410e..b4022561f54 100644
--- a/spec/requests/groups/harbor/repositories_controller_spec.rb
+++ b/spec/requests/groups/harbor/repositories_controller_spec.rb
@@ -3,67 +3,8 @@
require 'spec_helper'
RSpec.describe Groups::Harbor::RepositoriesController do
- let_it_be(:group, reload: true) { create(:group) }
- let_it_be(:user) { create(:user) }
-
- shared_examples 'responds with 404 status' do
- it 'returns 404' do
- subject
-
- expect(response).to have_gitlab_http_status(:not_found)
- end
- end
-
- shared_examples 'responds with 200 status' do
- it 'renders the index template' do
- subject
-
- expect(response).to have_gitlab_http_status(:ok)
- expect(response).to render_template(:index)
- end
- end
-
- before do
- stub_feature_flags(harbor_registry_integration: true)
- group.add_reporter(user)
- login_as(user)
- end
-
- describe 'GET #index' do
- subject do
- get group_harbor_registries_path(group)
- response
- end
-
- context 'with harbor registry feature flag enabled' do
- it_behaves_like 'responds with 200 status'
- end
-
- context 'with harbor registry feature flag disabled' do
- before do
- stub_feature_flags(harbor_registry_integration: false)
- end
-
- it_behaves_like 'responds with 404 status'
- end
- end
-
- describe 'GET #show' do
- subject do
- get group_harbor_registry_path(group, 1)
- response
- end
-
- context 'with harbor registry feature flag enabled' do
- it_behaves_like 'responds with 200 status'
- end
-
- context 'with harbor registry feature flag disabled' do
- before do
- stub_feature_flags(harbor_registry_integration: false)
- end
-
- it_behaves_like 'responds with 404 status'
- end
+ it_behaves_like 'a harbor repositories controller', anonymous_status_code: '404' do
+ let_it_be(:container, reload: true) { create(:group) }
+ let_it_be(:harbor_integration) { create(:harbor_integration, group: container, project: nil) }
end
end
diff --git a/spec/requests/groups/harbor/tags_controller_spec.rb b/spec/requests/groups/harbor/tags_controller_spec.rb
new file mode 100644
index 00000000000..257d4366837
--- /dev/null
+++ b/spec/requests/groups/harbor/tags_controller_spec.rb
@@ -0,0 +1,10 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe Groups::Harbor::TagsController do
+ it_behaves_like 'a harbor tags controller', anonymous_status_code: '404' do
+ let_it_be(:container) { create(:group) }
+ let_it_be(:harbor_integration) { create(:harbor_integration, group: container, project: nil) }
+ end
+end