mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-23 15:19:38 +02:00
* Transfer data model migration * Transfers and payment modeling and UI improvements * Fix CI * Transfer matching flow * Better UI for transfers * Auto transfer matching, approve, reject flow * Mark transfers created from form as confirmed * Account filtering * Excluded rejected transfers from calculations * Calculation tweaks with transfer exclusions * Clean up migration
31 lines
771 B
Ruby
31 lines
771 B
Ruby
require "application_system_test_case"
|
|
|
|
class TransfersTest < ApplicationSystemTestCase
|
|
setup do
|
|
sign_in @user = users(:family_admin)
|
|
visit transactions_url
|
|
end
|
|
|
|
test "can create a transfer" do
|
|
checking_name = accounts(:depository).name
|
|
savings_name = accounts(:credit_card).name
|
|
transfer_date = Date.current
|
|
|
|
click_on "New transaction"
|
|
|
|
# Will navigate to different route in same modal
|
|
click_on "Transfer"
|
|
assert_text "New transfer"
|
|
|
|
select checking_name, from: "From"
|
|
select savings_name, from: "To"
|
|
fill_in "transfer[amount]", with: 500
|
|
fill_in "Date", with: transfer_date
|
|
|
|
click_button "Create transfer"
|
|
|
|
within "#entry-group-" + transfer_date.to_s do
|
|
assert_text "Payment to"
|
|
end
|
|
end
|
|
end
|