Commit 5fa9332d authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'fj-remove-epic-check-in-sitemap' into 'master'

Remove epic check generating sitemap

See merge request gitlab-org/gitlab!47381
parents a2dfdbba 44cdee05
---
title: Remove epic check generating sitemap
merge_request: 47381
author:
type: changed
...@@ -25,10 +25,9 @@ module Gitlab ...@@ -25,10 +25,9 @@ module Gitlab
"#{base_url}#{full_path}", "#{base_url}#{full_path}",
"#{base_url}groups/#{full_path}/-/issues", "#{base_url}groups/#{full_path}/-/issues",
"#{base_url}groups/#{full_path}/-/merge_requests", "#{base_url}groups/#{full_path}/-/merge_requests",
"#{base_url}groups/#{full_path}/-/packages" "#{base_url}groups/#{full_path}/-/packages",
].tap do |urls| "#{base_url}groups/#{full_path}/-/epics"
urls << "#{base_url}groups/#{full_path}/-/epics" if group.feature_available?(:epics) ]
end
end end
def extract_from_project(project) def extract_from_project(project)
......
...@@ -55,8 +55,6 @@ RSpec.describe Gitlab::Sitemaps::UrlExtractor do ...@@ -55,8 +55,6 @@ RSpec.describe Gitlab::Sitemaps::UrlExtractor do
subject { described_class.extract_from_group(group) } subject { described_class.extract_from_group(group) }
it 'returns several group urls' do it 'returns several group urls' do
stub_licensed_features(epics: true)
expected_urls = [ expected_urls = [
group_url(group), group_url(group),
issues_group_url(group), issues_group_url(group),
...@@ -67,14 +65,6 @@ RSpec.describe Gitlab::Sitemaps::UrlExtractor do ...@@ -67,14 +65,6 @@ RSpec.describe Gitlab::Sitemaps::UrlExtractor do
expect(subject).to match_array(expected_urls) expect(subject).to match_array(expected_urls)
end end
context 'when epics are not enabled' do
it 'does nor include epics url' do
stub_licensed_features(epics: false)
expect(subject).not_to include(group_epics_url(group))
end
end
end end
describe '.extract_from_project' do describe '.extract_from_project' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment