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>2021-05-19 18:44:42 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-05-19 18:44:42 +0300
commit4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch)
tree5423a1c7516cffe36384133ade12572cf709398d /spec/lib/api/entities/release_spec.rb
parente570267f2f6b326480d284e0164a6464ba4081bc (diff)
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'spec/lib/api/entities/release_spec.rb')
-rw-r--r--spec/lib/api/entities/release_spec.rb39
1 files changed, 31 insertions, 8 deletions
diff --git a/spec/lib/api/entities/release_spec.rb b/spec/lib/api/entities/release_spec.rb
index 06062634015..4f40830a15c 100644
--- a/spec/lib/api/entities/release_spec.rb
+++ b/spec/lib/api/entities/release_spec.rb
@@ -54,18 +54,41 @@ RSpec.describe API::Entities::Release do
subject(:description_html) { entity.as_json['description_html'] }
- it 'renders special references if current user has access' do
- project.add_reporter(user)
+ it 'is inexistent' do
+ expect(description_html).to be_nil
+ end
+
+ context 'when remove_description_html_in_release_api feature flag is disabled' do
+ before do
+ stub_feature_flags(remove_description_html_in_release_api: false)
+ end
+
+ it 'renders special references if current user has access' do
+ project.add_reporter(user)
+
+ expect(description_html).to include(issue_path)
+ expect(description_html).to include(issue_title)
+ end
- expect(description_html).to include(issue_path)
- expect(description_html).to include(issue_title)
+ it 'does not render special references if current user has no access' do
+ project.add_guest(user)
+
+ expect(description_html).not_to include(issue_path)
+ expect(description_html).not_to include(issue_title)
+ end
end
- it 'does not render special references if current user has no access' do
- project.add_guest(user)
+ context 'when remove_description_html_in_release_api_override feature flag is enabled' do
+ before do
+ stub_feature_flags(remove_description_html_in_release_api_override: project)
+ end
- expect(description_html).not_to include(issue_path)
- expect(description_html).not_to include(issue_title)
+ it 'renders special references if current user has access' do
+ project.add_reporter(user)
+
+ expect(description_html).to include(issue_path)
+ expect(description_html).to include(issue_title)
+ end
end
end
end