Skip to content

Commit

Permalink
Add a test
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelbabu authored and amercader committed Apr 17, 2013
1 parent a379cd7 commit 84cb2f3
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions ckan/tests/functional/api/test_dashboard.py
Expand Up @@ -331,3 +331,22 @@ def test_09_activities_that_should_not_show(self):
after = self.dashboard_activity_list(self.new_user)

assert before == after

def test_10_dashboard_activity_list_html(self):
'''Test that dashboard activity list html call works.'''

params = json.dumps({'name': 'irrelevant_dataset'})
response = self.app.post('/api/action/package_create', params=params,
extra_environ={'Authorization': str(self.annafan['apikey'])})
assert response.json['success'] is True

params = json.dumps({'name': 'another_irrelevant_dataset'})
response = self.app.post('/api/action/package_create', params=params,
extra_environ={'Authorization': str(self.annafan['apikey'])})
assert response.json['success'] is True

res = self.app.get('/api/3/action/dashboard_activity_list_html',
extra_environ={'Authorization':
str(self.annafan['apikey'])})
print res.json['result']
assert res.json['success'] is True

0 comments on commit 84cb2f3

Please sign in to comment.