Fix tests
This commit is contained in:
parent
fbf6923835
commit
6e1a17281d
22 changed files with 235 additions and 13 deletions
|
|
@ -3,8 +3,24 @@
|
|||
require "test_helper"
|
||||
|
||||
class LinkCategoriesControllerTest < ActionDispatch::IntegrationTest
|
||||
def login(email, password)
|
||||
post "/login", params: { email: email, password: password }
|
||||
assert_redirected_to "/"
|
||||
end
|
||||
|
||||
def logout
|
||||
post "/logout"
|
||||
assert_redirected_to "/"
|
||||
end
|
||||
|
||||
teardown do
|
||||
logout
|
||||
end
|
||||
|
||||
setup do
|
||||
@link_category = link_categories(:one)
|
||||
Account.create(email: "test@example.com", password: "password")
|
||||
login("test@example.com", "password")
|
||||
end
|
||||
|
||||
test "should get index" do
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue