sample_rails_tailwind/test/integration/users_login_test.rb

15 lines
366 B
Ruby
Raw Normal View History

2025-01-01 15:44:50 +08:00
require "test_helper"
class UsersLoginTest < ActionDispatch::IntegrationTest
test "login with invalid information" do
get login_path
assert_template 'sessions/new'
post login_path, params: { session: {
email: "", password: "" } }
assert_template 'sessions/new'
assert_not flash.empty?
get root_path
assert flash.empty?
end
end