Skip to content

Commit

Permalink
[#446] Accept either .min.js or .js in ckanext/*preview tests
Browse files Browse the repository at this point in the history
We don't care if the page which one is added to the page, as long as
one of them is there.

Fixes #446.
  • Loading branch information
vitorbaptista committed Feb 25, 2013
1 parent e1b5fc9 commit 145d0b6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions ckanext/jsonpreview/tests/test_preview.py
@@ -1,7 +1,7 @@
import pylons

import paste.fixture
from pylons import config

import pylons.config as config

import ckan.logic as logic
import ckan.model as model
Expand Down Expand Up @@ -83,7 +83,7 @@ def test_js_included(self):
result = self.app.get(url, status='*')

assert result.status == 200, result.status
assert 'preview_json.min.js' in result.body, result.body
assert (('preview_json.js' in result.body) or ('preview_json.min.js' in result.body)), result.body
assert 'preload_resource' in result.body, result.body
assert 'data-module="jsonpreview"' in result.body, result.body

Expand Down
6 changes: 3 additions & 3 deletions ckanext/pdfpreview/tests/test_preview.py
@@ -1,7 +1,7 @@
import pylons

import paste.fixture
from pylons import config

import pylons.config as config

import ckan.logic as logic
import ckan.model as model
Expand Down Expand Up @@ -86,7 +86,7 @@ def test_js_included(self):
result = self.app.get(url, status='*')

assert result.status == 200, result.status
assert 'preview_pdf.min.js' in result.body, result.body
assert (('preview_pdf.js' in result.body) or ('preview_pdf.min.js' in result.body)), result.body
assert 'preload_resource' in result.body, result.body
assert 'data-module="pdfpreview"' in result.body, result.body

Expand Down
6 changes: 3 additions & 3 deletions ckanext/reclinepreview/tests/test_preview.py
@@ -1,7 +1,7 @@
import pylons

import paste.fixture
from pylons import config

import pylons.config as config

import ckan.logic as logic
import ckan.model as model
Expand Down Expand Up @@ -115,7 +115,7 @@ def test_js_included(self):
result = self.app.get(url, status='*')

assert result.status == 200, result.status
assert 'preview_recline.min.js' in result.body, result.body
assert (('preview_recline.js' in result.body) or ('preview_recline.min.js' in result.body)), result.body
assert 'preload_resource' in result.body, result.body
assert 'data-module="reclinepreview"' in result.body, result.body

Expand Down

0 comments on commit 145d0b6

Please sign in to comment.