Skip to content

Commit

Permalink
Bug 823919: Fix content-type of tabzilla.js.
Browse files Browse the repository at this point in the history
  • Loading branch information
pmac committed Dec 21, 2012
1 parent a61ea12 commit 10639b0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions 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')
3 changes: 2 additions & 1 deletion apps/tabzilla/views.py
Expand Up @@ -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')

0 comments on commit 10639b0

Please sign in to comment.