Sha256: 882c4e8effdb46a0b3b6813a4ad06e21faa0915fc67330f7c4bb1d196735ae64
Contents?: true
Size: 941 Bytes
Versions: 6
Compression:
Stored size: 941 Bytes
Contents
require "test_helper" class AuthenticationTest < ActionDispatch::IntegrationTest def test_sign_in_and_out AdminUser.create!(email: "admin@example.com", password: "password") visit authenticated_articles_path assert_not_equal authenticated_articles_path, current_path fill_in "Email", with: "admin@example.com" fill_in "Password", with: "password" click_button "Sign in" visit authenticated_articles_path assert_equal authenticated_articles_path, current_path click_link "Sign out" visit authenticated_articles_path assert_not_equal authenticated_articles_path, current_path end def test_sign_in_with_non_default_user AnotherAdminUser.create!(email: "another_admin@example.com", password: "password") post another_admin_session_path, params: { another_admin_user: { email: "another_admin@example.com", password: "password" } } assert_redirected_to root_path end end
Version data entries
6 entries across 6 versions & 1 rubygems