Improved login and prepared logout
Change-Id: I29e7c3752682e1016cbbd861ac1c1c3dd64964ab
diff --git a/t/remote_user.t b/t/remote_user.t
index 5e23b95..d904fb7 100644
--- a/t/remote_user.t
+++ b/t/remote_user.t
@@ -11,9 +11,6 @@
$t->get_ok('/')
->element_exists('form[action=/user/login] input[name=handle_or_email]');
-#$t->post_ok('/user/login' => form => { handle_or_email => 'test' })
-# ->status_is(302);
-
$t->post_ok('/user/login' => form => { handle_or_email => 'test', pwd => 'fail' })
->status_is(302)
->header_is('Location' => '/');
@@ -24,6 +21,17 @@
->element_exists('input[name=handle_or_email][value=test]')
;
+$t->post_ok('/user/login' => form => { handle_or_email => 'test', pwd => 'pass' })
+ ->status_is(302)
+ ->header_is('Location' => '/');
+
+$t->get_ok('/')
+ ->status_is(200)
+ ->element_exists_not('div.notify-error')
+ ->element_exists('div.notify-success')
+ ->text_is('div.notify-success', 'Login successful!')
+ ;
+
done_testing;
__END__