+ assert_select "span.username", false
+ end
+
+ def test_login_username_password_public
+ user = users(:public_user)
+
+ try_password_login user.display_name, "test"
+
+ assert_template "changeset/history"
+ assert_select "span.username", "test2"
+ end
+
+ def test_login_username_password_public_upcase
+ user = users(:public_user)
+
+ try_password_login user.display_name.upcase, "test"
+
+ assert_template "changeset/history"
+ assert_select "span.username", "test2"
+ end
+
+ def test_login_username_password_public_titlecase
+ user = users(:public_user)
+
+ try_password_login user.display_name.titlecase, "test"
+
+ assert_template "changeset/history"
+ assert_select "span.username", "test2"
+ end
+
+ def test_login_username_password_inactive
+ user = users(:inactive_user)
+
+ try_password_login user.display_name, "test2"
+
+ assert_template "confirm"
+ assert_select "span.username", false
+ end
+
+ def test_login_username_password_inactive_upcase
+ user = users(:inactive_user)
+
+ try_password_login user.display_name.upcase, "test2"
+
+ assert_template "confirm"
+ assert_select "span.username", false
+ end
+
+ def test_login_username_password_inactive_titlecase
+ user = users(:inactive_user)
+
+ try_password_login user.display_name.titlecase, "test2"
+
+ assert_template "confirm"
+ assert_select "span.username", false
+ end
+
+ def test_login_username_password_suspended
+ user = users(:suspended_user)
+
+ try_password_login user.display_name, "test"
+
+ assert_template "login"
+ assert_select "span.username", false