Add standardrb

This commit is contained in:
Andrew Tomaka 2023-03-07 22:09:33 -05:00
parent fe99fbc9de
commit 91e2a5f4ff
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
14 changed files with 87 additions and 53 deletions

View file

@ -17,7 +17,7 @@ class CreditCardBillsControllerTest < ActionDispatch::IntegrationTest
test "should create credit_card_bill" do
assert_difference("CreditCardBill.count") do
post credit_card_bills_url, params: { credit_card_bill: { amount: @credit_card_bill.amount, description: @credit_card_bill.description } }
post credit_card_bills_url, params: {credit_card_bill: {amount: @credit_card_bill.amount, description: @credit_card_bill.description}}
end
assert_redirected_to credit_card_bill_url(CreditCardBill.last)
@ -34,7 +34,7 @@ class CreditCardBillsControllerTest < ActionDispatch::IntegrationTest
end
test "should update credit_card_bill" do
patch credit_card_bill_url(@credit_card_bill), params: { credit_card_bill: { amount: @credit_card_bill.amount, description: @credit_card_bill.description } }
patch credit_card_bill_url(@credit_card_bill), params: {credit_card_bill: {amount: @credit_card_bill.amount, description: @credit_card_bill.description}}
assert_redirected_to credit_card_bill_url(@credit_card_bill)
end

View file

@ -17,7 +17,7 @@ class ExpensesControllerTest < ActionDispatch::IntegrationTest
test "should create expense" do
assert_difference("Expense.count") do
post expenses_url, params: { expense: { credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period } }
post expenses_url, params: {expense: {credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period}}
end
assert_redirected_to expense_url(Expense.last)
@ -34,7 +34,7 @@ class ExpensesControllerTest < ActionDispatch::IntegrationTest
end
test "should update expense" do
patch expense_url(@expense), params: { expense: { credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period } }
patch expense_url(@expense), params: {expense: {credit_card: @expense.credit_card, description: @expense.description, estimated: @expense.estimated, payment: @expense.payment, period: @expense.period}}
assert_redirected_to expense_url(@expense)
end

View file

@ -17,7 +17,7 @@ class IncomesControllerTest < ActionDispatch::IntegrationTest
test "should create income" do
assert_difference("Income.count") do
post incomes_url, params: { income: { amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id } }
post incomes_url, params: {income: {amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id}}
end
assert_redirected_to income_url(Income.last)
@ -34,7 +34,7 @@ class IncomesControllerTest < ActionDispatch::IntegrationTest
end
test "should update income" do
patch income_url(@income), params: { income: { amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id } }
patch income_url(@income), params: {income: {amount: @income.amount, description: @income.description, included: @income.included, member_id: @income.member_id}}
assert_redirected_to income_url(@income)
end

View file

@ -17,7 +17,7 @@ class MembersControllerTest < ActionDispatch::IntegrationTest
test "should create member" do
assert_difference("Member.count") do
post members_url, params: { member: { name: @member.name, pays: @member.pays } }
post members_url, params: {member: {name: @member.name, pays: @member.pays}}
end
assert_redirected_to member_url(Member.last)
@ -34,7 +34,7 @@ class MembersControllerTest < ActionDispatch::IntegrationTest
end
test "should update member" do
patch member_url(@member), params: { member: { name: @member.name, pays: @member.pays } }
patch member_url(@member), params: {member: {name: @member.name, pays: @member.pays}}
assert_redirected_to member_url(@member)
end