Add coverage for "default" stylesheet theme helper path (#34732)
This commit is contained in:
parent
b195956ecb
commit
38e0a360ca
1 changed files with 13 additions and 2 deletions
|
@ -6,10 +6,10 @@ RSpec.describe ThemeHelper do
|
||||||
describe 'theme_style_tags' do
|
describe 'theme_style_tags' do
|
||||||
let(:result) { helper.theme_style_tags(theme) }
|
let(:result) { helper.theme_style_tags(theme) }
|
||||||
|
|
||||||
context 'when using system theme' do
|
context 'when using "system" theme' do
|
||||||
let(:theme) { 'system' }
|
let(:theme) { 'system' }
|
||||||
|
|
||||||
it 'returns the mastodon-light and default stylesheets with correct color schemes' do
|
it 'returns the mastodon-light and application stylesheets with correct color schemes' do
|
||||||
expect(html_links.first.attributes.symbolize_keys)
|
expect(html_links.first.attributes.symbolize_keys)
|
||||||
.to include(
|
.to include(
|
||||||
href: have_attributes(value: match(/mastodon-light/)),
|
href: have_attributes(value: match(/mastodon-light/)),
|
||||||
|
@ -23,6 +23,17 @@ RSpec.describe ThemeHelper do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'when using "default" theme' do
|
||||||
|
let(:theme) { 'default' }
|
||||||
|
|
||||||
|
it 'returns the application stylesheet' do
|
||||||
|
expect(html_links.last.attributes.symbolize_keys)
|
||||||
|
.to include(
|
||||||
|
href: have_attributes(value: match(/application/))
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'when using other theme' do
|
context 'when using other theme' do
|
||||||
let(:theme) { 'contrast' }
|
let(:theme) { 'contrast' }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue