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/helpers/tab_helper_spec.rb')
-rw-r--r--spec/helpers/tab_helper_spec.rb12
1 files changed, 9 insertions, 3 deletions
diff --git a/spec/helpers/tab_helper_spec.rb b/spec/helpers/tab_helper_spec.rb
index e5e88466946..eaf2a4d11c1 100644
--- a/spec/helpers/tab_helper_spec.rb
+++ b/spec/helpers/tab_helper_spec.rb
@@ -161,18 +161,24 @@ RSpec.describe TabHelper do
describe 'gl_tab_counter_badge' do
it 'creates a tab counter badge' do
- expect(gl_tab_counter_badge(1)).to eq('<span class="badge badge-muted badge-pill gl-badge sm gl-tab-counter-badge">1</span>')
+ expect(helper.gl_tab_counter_badge(1)).to eq(
+ '<span class="gl-badge badge badge-pill badge-muted sm gl-tab-counter-badge">1</span>'
+ )
end
context 'with extra classes' do
it 'creates a tab counter badge with the correct class attribute' do
- expect(gl_tab_counter_badge(1, { class: 'js-test' })).to eq('<span class="js-test badge badge-muted badge-pill gl-badge sm gl-tab-counter-badge">1</span>')
+ expect(helper.gl_tab_counter_badge(1, { class: 'js-test' })).to eq(
+ '<span class="gl-badge badge badge-pill badge-muted sm gl-tab-counter-badge js-test">1</span>'
+ )
end
end
context 'with data attributes' do
it 'creates a tab counter badge with the data attributes' do
- expect(gl_tab_counter_badge(1, { data: { some_attribute: 'foo' } })).to eq('<span class="badge badge-muted badge-pill gl-badge sm gl-tab-counter-badge" data-some-attribute="foo">1</span>')
+ expect(helper.gl_tab_counter_badge(1, { data: { some_attribute: 'foo' } })).to eq(
+ '<span data-some-attribute="foo" class="gl-badge badge badge-pill badge-muted sm gl-tab-counter-badge">1</span>'
+ )
end
end
end