Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #548 from pmclanahan/bug-823919-tabzilla-text-java…

…script

Bug 823919: Fix content-type of tabzilla.js.
  • Loading branch information...
commit 4cd200a80662b0e2f6f04fe392a509b77330b617 2 parents a61ea12 + 10639b0
@pmclanahan pmclanahan authored
Showing with 18 additions and 1 deletion.
  1. +16 −0 apps/tabzilla/tests.py
  2. +2 −1  apps/tabzilla/views.py
View
16 apps/tabzilla/tests.py
@@ -0,0 +1,16 @@
+from django.test import Client
+
+from funfactory.urlresolvers import reverse
+
+from mozorg.tests import TestCase
+
+
+class TabzillaViewTests(TestCase):
+ def setUp(self):
+ self.client = Client()
+
+ def test_tabzilla_content_type(self):
+ """ Content-Type header should be text/javascript. """
+ with self.activate('en-US'):
+ resp = self.client.get(reverse('tabzilla'))
+ self.assertEqual(resp['content-type'], 'text/javascript')
View
3  apps/tabzilla/views.py
@@ -2,4 +2,5 @@
def tabzilla_js(request):
- return l10n_utils.render(request, 'tabzilla/tabzilla.js')
+ return l10n_utils.render(request, 'tabzilla/tabzilla.js',
+ content_type='text/javascript')
Please sign in to comment.
Something went wrong with that request. Please try again.