mirror of
https://github.com/we-promise/sure.git
synced 2026-05-09 13:45:01 +00:00
fix: currency being ignored for properties (#1556)
* fix: add property with different currency is not updating * fix: add property with different currency test * fix: code review * fix: code review
This commit is contained in:
committed by
GitHub
parent
9b2c80768c
commit
c9f9e04071
@@ -14,4 +14,18 @@ module AccountableResourceInterfaceTest
|
||||
get edit_account_url(@account)
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
test "update saves currency change" do
|
||||
@account.update!(currency: "USD")
|
||||
|
||||
patch send("#{@account.accountable_type.underscore}_path", @account), params: {
|
||||
account: {
|
||||
name: @account.name,
|
||||
currency: "EUR"
|
||||
}
|
||||
}
|
||||
|
||||
@account.reload
|
||||
assert_equal "EUR", @account.currency
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user