Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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')