parent
0f95034e8e
commit
c64550785e
15 changed files with 84 additions and 11 deletions
|
@ -3,6 +3,7 @@ require "application_system_test_case"
|
|||
class CreditCardBillsTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@credit_card_bill = credit_card_bills(:one)
|
||||
login(users(:one).email)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
|
|
|
@ -3,6 +3,7 @@ require "application_system_test_case"
|
|||
class ExpensesTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@expense = expenses(:monthly_expense)
|
||||
login(users(:one).email)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
|
|
|
@ -3,6 +3,7 @@ require "application_system_test_case"
|
|||
class IncomesTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@income = incomes(:included_1)
|
||||
login(users(:one).email)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
|
|
|
@ -3,6 +3,7 @@ require "application_system_test_case"
|
|||
class MembersTest < ApplicationSystemTestCase
|
||||
setup do
|
||||
@member = members(:one)
|
||||
login(users(:one).email)
|
||||
end
|
||||
|
||||
test "visiting the index" do
|
||||
|
|
|
@ -6,13 +6,14 @@ class UsersTest < ApplicationSystemTestCase
|
|||
end
|
||||
|
||||
test "visiting the index" do
|
||||
login(@user.email)
|
||||
visit users_url
|
||||
assert_selector "h1", text: "Users"
|
||||
end
|
||||
|
||||
test "should create user" do
|
||||
visit users_url
|
||||
click_on "New user"
|
||||
click_on "Sign up"
|
||||
|
||||
fill_in "Email", with: "userthree@example.local"
|
||||
fill_in "Password", with: "secret"
|
||||
|
@ -24,6 +25,7 @@ class UsersTest < ApplicationSystemTestCase
|
|||
end
|
||||
|
||||
test "should update User" do
|
||||
login(@user.email)
|
||||
visit user_url(@user)
|
||||
click_on "Edit this user", match: :first
|
||||
|
||||
|
@ -37,7 +39,8 @@ class UsersTest < ApplicationSystemTestCase
|
|||
end
|
||||
|
||||
test "should destroy User" do
|
||||
visit user_url(@user)
|
||||
login(@user.email)
|
||||
visit user_url(users(:two))
|
||||
click_on "Destroy this user", match: :first
|
||||
|
||||
assert_text "User was successfully destroyed"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue