Skip to content

Commit

Permalink
[#2042] Add extra test for completeness.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Read committed Nov 21, 2014
1 parent 737c4bd commit acb3e7f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions ckan/new_tests/controllers/test_feed.py
Expand Up @@ -7,13 +7,6 @@

class TestFeedNew(helpers.FunctionalTestBase):

@classmethod
def setup_class(cls):
helpers.reset_db()

def setup(self):
model.repo.rebuild_db()

def test_atom_feed_page_zero_gives_error(self):
group = factories.Group()
offset = url_for(controller='feed', action='group',
Expand All @@ -29,3 +22,11 @@ def test_atom_feed_page_negative_gives_error(self):
app = self._get_test_app()
res = app.get(offset, status=400)
assert '"page" parameter must be a positive integer' in res, res

def test_atom_feed_page_not_int_gives_error(self):
group = factories.Group()
offset = url_for(controller='feed', action='group',
id=group['name']) + '?page=abc'
app = self._get_test_app()
res = app.get(offset, status=400)
assert '"page" parameter must be a positive integer' in res, res

0 comments on commit acb3e7f

Please sign in to comment.