Commit a291bf5d authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'update-test-suite-for-tier-badges' into 'master'

Update test suite for product tiers

See merge request gitlab-org/gitlab!52791
parents 68195a29 1cb37fe5
......@@ -53,33 +53,23 @@ RSpec.describe Gitlab::Utils::Markdown do
end
context 'when string has a product suffix' do
let(:string) { 'My Header (ULTIMATE)' }
it 'ignores a product suffix' do
is_expected.to eq 'my-header'
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
let(:string) { 'My Header **(PREMIUM)**' }
it 'ignores a product suffix' do
is_expected.to eq 'my-header'
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'
%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
is_expected.to eq 'my-header'
end
context 'with "*" around a product suffix' do
let(:string) { "My Header **(#{tier}#{modifier})**" }
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