Andrew Tomaka
e8a42f9c82
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #4
43 lines
1.2 KiB
Ruby
43 lines
1.2 KiB
Ruby
require "application_system_test_case"
|
|
|
|
class CreditCardBillsTest < ApplicationSystemTestCase
|
|
setup do
|
|
@credit_card_bill = credit_card_bills(:one)
|
|
end
|
|
|
|
test "visiting the index" do
|
|
visit credit_card_bills_url
|
|
assert_selector "h1", text: "Credit card bills"
|
|
end
|
|
|
|
test "should create credit card bill" do
|
|
visit credit_card_bills_url
|
|
click_on "New credit card bill"
|
|
|
|
fill_in "Amount", with: @credit_card_bill.amount
|
|
fill_in "Description", with: @credit_card_bill.description
|
|
click_on "Create Credit card bill"
|
|
|
|
assert_text "Credit card bill was successfully created"
|
|
click_on "Back"
|
|
end
|
|
|
|
test "should update Credit card bill" do
|
|
visit credit_card_bill_url(@credit_card_bill)
|
|
click_on "Edit this credit card bill", match: :first
|
|
|
|
fill_in "Amount", with: @credit_card_bill.amount
|
|
fill_in "Description", with: @credit_card_bill.description
|
|
click_on "Update Credit card bill"
|
|
|
|
assert_text "Credit card bill was successfully updated"
|
|
click_on "Back"
|
|
end
|
|
|
|
test "should destroy Credit card bill" do
|
|
visit credit_card_bill_url(@credit_card_bill)
|
|
click_on "Destroy this credit card bill", match: :first
|
|
|
|
assert_text "Credit card bill was successfully destroyed"
|
|
end
|
|
end
|