mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-21 14:19:39 +02:00
* Rename account balance field for clarity `original_balance` and `original_currency` may infer that these values are "original" to the account. In reality, they represent the "current" balance and currency on the account. * Prepare fixture data for account sync testing * Update to new field * Fix conflicts * Remove local schema change
19 lines
478 B
Ruby
19 lines
478 B
Ruby
require "test_helper"
|
|
|
|
class ValuationsControllerTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
sign_in @user = users(:family_admin)
|
|
@account = accounts(:generic)
|
|
end
|
|
|
|
test "new" do
|
|
get new_account_valuation_url(@account)
|
|
assert_response :success
|
|
end
|
|
|
|
test "create" do
|
|
assert_difference("Valuation.count") do
|
|
post account_valuations_url(@account), params: { valuation: { value: 1, date: Date.current, type: "Appraisal" } }
|
|
end
|
|
end
|
|
end
|