Configure tests and helpers for current backend state
This commit is contained in:
parent
471440804c
commit
4edae5e7bb
9 changed files with 85 additions and 11 deletions
19
test/controllers/sessions_controller_test.rb
Normal file
19
test/controllers/sessions_controller_test.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
require "test_helper"
|
||||
|
||||
class SessionsControllerTest < ActionDispatch::IntegrationTest
|
||||
test "should get new" do
|
||||
get new_sessions_path
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "should get create" do
|
||||
post sessions_path, params: { email: "test@email.com", password: "testpassword" }
|
||||
assert_redirected_to root_path
|
||||
end
|
||||
|
||||
test "should get destroy" do
|
||||
post sessions_path, params: { email: "test@email.com", password: "testpassword" }
|
||||
delete sessions_path
|
||||
assert_redirected_to root_path
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue