From 278aeb74ad9fb3fae1b1813b98c383d7e7c5d37a Mon Sep 17 00:00:00 2001 From: Philipp Tessenow Date: Mon, 22 Jul 2013 11:46:52 +0200 Subject: [PATCH] add cuke to test that a (b)locked user cannot log in --- features/session/user_session.feature | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/features/session/user_session.feature b/features/session/user_session.feature index c02d661803..1aa2b048c9 100644 --- a/features/session/user_session.feature +++ b/features/session/user_session.feature @@ -47,3 +47,13 @@ Feature: User session And I wait for "4" minutes And I go to the home page Then I should be logged in as "bob" + + Scenario: A blocked user cannot log in + Given there is 1 user with the following: + | login | blocked_user | + | password | iamblocked | + | password_confirmation | iamblocked | + And the user "blocked_user" is locked + When I login as blocked_user with password iamblocked + Then there should be a flash error message + And the flash message should contain "Invalid user or password"