Sha256: b871c79a8876b39dd75aead0c01578e7c82fd94c2d705e9ac27a90eef980ef73
Contents?: true
Size: 819 Bytes
Versions: 9
Compression:
Stored size: 819 Bytes
Contents
require 'test_helper' class Auth::AuthenticationTest < ActionDispatch::IntegrationTest test 'login screen can be rendered' do get login_path assert_response :success end test 'users can authenticate using the login screen' do user = FactoryBot.create(:user) post login_path, params: { email: user.email, password: 'password' } assert_authenticated assert_redirected_to dashboard_path end test 'users cannot authenticate with invalid password' do user = FactoryBot.create(:user) post login_path, params: { email: user.email, password: 'wrong-password' } assert_guest end test 'users can logout' do user = FactoryBot.create(:user) acting_as(user).post logout_path assert_guest assert_redirected_to '/' end end
Version data entries
9 entries across 9 versions & 1 rubygems