mirror of
https://github.com/we-promise/sure.git
synced 2026-04-18 03:24:09 +00:00
Fix crypto subtype for trades api (#1022)
* fix: crypto subtype not persisted by permitting :subtype in CryptosController * Backfill crypto subtype for existig accounts so Trades API works * fix: backfill only unlinked cryptos; use raw SQL in migration; deterministic redirect in test * Update schema.rb for BackfillcryptoSubtypeForTrades migration --------- Signed-off-by: dataCenter430 <161712630+dataCenter430@users.noreply.github.com>
This commit is contained in:
@@ -27,4 +27,10 @@ class CryptoTest < ActiveSupport::TestCase
|
||||
assert crypto.tax_deferred?
|
||||
assert_not crypto.tax_exempt?
|
||||
end
|
||||
|
||||
test "supports_trades? is true only for exchange subtype" do
|
||||
assert Crypto.new(subtype: "exchange").supports_trades?
|
||||
refute Crypto.new(subtype: "wallet").supports_trades?
|
||||
refute Crypto.new(subtype: nil).supports_trades?
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user