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:
David Taylor
2019-01-28 11:19:50 +00:00
committed by GitHub
parent 244628ed98
commit aca0b32fda
10 changed files with 56 additions and 20 deletions

View File

@ -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