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 ...@@ -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|
it 'ignores a product suffix' do context "#{tier}#{modifier}" do
is_expected.to eq 'my-header' let(:string) { "My Header (#{tier}#{modifier})" }
end
it 'ignores a product suffix' do
context 'with self modifier' do is_expected.to eq 'my-header'
let(:string) { 'My Header (PREMIUM SELF)' } end
it 'ignores a product suffix' do context 'with "*" around a product suffix' do
is_expected.to eq 'my-header' let(:string) { "My Header **(#{tier}#{modifier})**" }
end
end it 'ignores a product suffix' do
is_expected.to eq 'my-header'
context 'with "*" around a product suffix' do end
let(:string) { 'My Header **(PREMIUM)**' } end
end
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'
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