mirror of
https://github.com/discourse/discourse.git
synced 2025-05-24 01:57:15 +08:00
FEATURE: Allow overriding text size from a different device (#6955)
This brings the feature in line with the theme selection system
This commit is contained in:
@ -178,9 +178,18 @@ describe ApplicationHelper do
|
||||
expect(helper.html_classes.split(" ")).to include('text-size-larger')
|
||||
end
|
||||
|
||||
it 'ignores cookies with lower sequence' do
|
||||
user.user_option.update!(text_size_seq: 2)
|
||||
|
||||
helper.request.cookies["text_size"] = "normal|1"
|
||||
expect(helper.html_classes.split(" ")).to include('text-size-larger')
|
||||
end
|
||||
|
||||
it 'prioritises the cookie specified text size' do
|
||||
helper.request.cookies["text_size"] = "normal"
|
||||
expect(helper.html_classes.split(" ")).to include('text-size-normal')
|
||||
user.user_option.update!(text_size_seq: 2)
|
||||
|
||||
helper.request.cookies["text_size"] = "largest|4"
|
||||
expect(helper.html_classes.split(" ")).to include('text-size-largest')
|
||||
end
|
||||
|
||||
it 'includes the user specified text size' do
|
||||
|
Reference in New Issue
Block a user