Skip to content

Commit

Permalink
[#2543] Front-end test for logout redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
brew committed Jul 20, 2015
1 parent e711c1d commit 9ccba42
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions ckan/tests/controllers/test_user.py
Expand Up @@ -123,6 +123,19 @@ def test_registered_user_login_bad_password(self):
.format(user['fullname']))


class TestLogout(helpers.FunctionalTestBase):

def test_user_logout(self):
'''_logout url redirects to logged out page.'''
app = self._get_test_app()

logout_url = url_for(controller='user', action='logout')
logout_response = app.get(logout_url, status=302)
final_response = helpers.webtest_maybe_follow(logout_response)

assert_true('You are now logged out.' in final_response)


class TestUser(helpers.FunctionalTestBase):

def test_own_datasets_show_up_on_user_dashboard(self):
Expand Down

0 comments on commit 9ccba42

Please sign in to comment.