Commit 9f46d9f0 by Sarina Canelake

Regression test: dark lang stays set through multiple pages

parent cf80c96f
...@@ -186,6 +186,9 @@ class I18nLangPrefTests(BaseI18nTestCase): ...@@ -186,6 +186,9 @@ class I18nLangPrefTests(BaseI18nTestCase):
# Verify preview-lang takes precedence # Verify preview-lang takes precedence
response = self.client.get('{}?preview-lang=eo'.format(self.url)) response = self.client.get('{}?preview-lang=eo'.format(self.url))
self.assert_tag_has_attr(response.content, "html", "lang", 'eo') self.assert_tag_has_attr(response.content, "html", "lang", 'eo')
# Hitting another page should keep the dark language set.
response = self.client.get(reverse('courses'))
self.assert_tag_has_attr(response.content, "html", "lang", "eo")
# Clearing language must set language back to preference language # Clearing language must set language back to preference language
response = self.client.get('{}?clear-lang'.format(self.url)) response = self.client.get('{}?clear-lang'.format(self.url))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment