Commit 1cb37fe5 authored by Vasilii Iakliushin's avatar Vasilii Iakliushin

Update test suite for product tiers

Follow-up for
https://gitlab.com/gitlab-org/gitlab/-/merge_requests/52703

The list of product tiers was recently updated. We want to reflect
these changes in the test suite.
parent 0bc6bbf0
...@@ -53,33 +53,23 @@ RSpec.describe Gitlab::Utils::Markdown do ...@@ -53,33 +53,23 @@ RSpec.describe Gitlab::Utils::Markdown do
end end
context 'when string has a product suffix' do context 'when string has a product suffix' do
let(:string) { 'My Header (ULTIMATE)' } %w[CORE STARTER PREMIUM ULTIMATE FREE BRONZE SILVER GOLD].each do |tier|
['', ' ONLY', ' SELF', ' SASS'].each do |modifier|
context "#{tier}#{modifier}" do
let(:string) { "My Header (#{tier}#{modifier})" }
it 'ignores a product suffix' do it 'ignores a product suffix' do
is_expected.to eq 'my-header' is_expected.to eq 'my-header'
end end
context 'with self modifier' do
let(:string) { 'My Header (PREMIUM SELF)' }
it 'ignores a product suffix' do
is_expected.to eq 'my-header'
end
end
context 'with "*" around a product suffix' do context 'with "*" around a product suffix' do
let(:string) { 'My Header **(PREMIUM)**' } let(:string) { "My Header **(#{tier}#{modifier})**" }
it 'ignores a product suffix' do it 'ignores a product suffix' do
is_expected.to eq 'my-header' is_expected.to eq 'my-header'
end end
end end
end
context 'with "*" around a product suffix and sass modifier' do
let(:string) { 'My Header **(PREMIUM SASS)**' }
it 'ignores a product suffix' do
is_expected.to eq 'my-header'
end end
end end
end end
......
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