Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Bug 823919: Fix content-type of tabzilla.js. #548

Merged
merged 1 commit into from

1 participant

@pmclanahan
Owner

No description provided.

@pmclanahan pmclanahan merged commit 4cd200a into from
@pmclanahan pmclanahan deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 21, 2012
  1. @pmclanahan
This page is out of date. Refresh to see the latest.
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')
Something went wrong with that request. Please try again.