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:
Diffstat (limited to 'spec/lib/gitlab/utils/markdown_spec.rb')
-rw-r--r--spec/lib/gitlab/utils/markdown_spec.rb35
1 files changed, 20 insertions, 15 deletions
diff --git a/spec/lib/gitlab/utils/markdown_spec.rb b/spec/lib/gitlab/utils/markdown_spec.rb
index 45953c7906e..d707cf51712 100644
--- a/spec/lib/gitlab/utils/markdown_spec.rb
+++ b/spec/lib/gitlab/utils/markdown_spec.rb
@@ -2,7 +2,7 @@
require 'fast_spec_helper'
-RSpec.describe Gitlab::Utils::Markdown do
+RSpec.describe Gitlab::Utils::Markdown, feature_category: :gitlab_docs do
let(:klass) do
Class.new do
include Gitlab::Utils::Markdown
@@ -53,25 +53,30 @@ RSpec.describe Gitlab::Utils::Markdown do
end
context 'when string has a product suffix' do
- %w[CORE STARTER PREMIUM ULTIMATE FREE BRONZE SILVER GOLD].each do |tier|
- ['', ' ONLY', ' SELF', ' SAAS'].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'
+ %w[PREMIUM ULTIMATE FREE].each do |tier|
+ [' ALL', ' SELF', ' SAAS'].each do |modifier|
+ ['', ' BETA', ' EXPERIMENT'].each do |status|
+ context "#{tier}#{modifier}#{status}" do
+ context 'with "*" around a product suffix' do
+ let(:string) { "My Header **(#{tier}#{modifier}#{status})**" }
+
+ it 'ignores a product suffix' do
+ is_expected.to eq 'my-header'
+ end
end
end
end
end
end
+ %w[BETA EXPERIMENT].each do |status|
+ context 'with "*" around a product suffix' do
+ let(:string) { "My Header **(#{status})**" }
+
+ it 'ignores a product suffix' do
+ is_expected.to eq 'my-header'
+ end
+ end
+ end
end
context 'when string is empty' do