2023-03-03 18:12:59 -05:00
|
|
|
require "test_helper"
|
|
|
|
|
|
|
|
class CreditCardBillsControllerTest < ActionDispatch::IntegrationTest
|
|
|
|
setup do
|
|
|
|
@credit_card_bill = credit_card_bills(:one)
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should get index" do
|
|
|
|
get credit_card_bills_url
|
|
|
|
assert_response :success
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should get new" do
|
|
|
|
get new_credit_card_bill_url
|
|
|
|
assert_response :success
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should create credit_card_bill" do
|
|
|
|
assert_difference("CreditCardBill.count") do
|
2023-03-08 19:25:24 -05:00
|
|
|
post credit_card_bills_url, params: {credit_card_bill: {amount: @credit_card_bill.amount, description: @credit_card_bill.description}}
|
2023-03-03 18:12:59 -05:00
|
|
|
end
|
|
|
|
|
|
|
|
assert_redirected_to credit_card_bill_url(CreditCardBill.last)
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should show credit_card_bill" do
|
|
|
|
get credit_card_bill_url(@credit_card_bill)
|
|
|
|
assert_response :success
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should get edit" do
|
|
|
|
get edit_credit_card_bill_url(@credit_card_bill)
|
|
|
|
assert_response :success
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should update credit_card_bill" do
|
2023-03-08 19:25:24 -05:00
|
|
|
patch credit_card_bill_url(@credit_card_bill), params: {credit_card_bill: {amount: @credit_card_bill.amount, description: @credit_card_bill.description}}
|
2023-03-03 18:12:59 -05:00
|
|
|
assert_redirected_to credit_card_bill_url(@credit_card_bill)
|
|
|
|
end
|
|
|
|
|
|
|
|
test "should destroy credit_card_bill" do
|
|
|
|
assert_difference("CreditCardBill.count", -1) do
|
|
|
|
delete credit_card_bill_url(@credit_card_bill)
|
|
|
|
end
|
|
|
|
|
|
|
|
assert_redirected_to credit_card_bills_url
|
|
|
|
end
|
|
|
|
end
|