1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-02 20:15:22 +02:00

feat: add crypto account type to demo data (#555)

* feat: add crypto account type to demo data

* fix: set currency to BTC, revert schema migration change and fix tests

* fix: update dates in time_series tests
This commit is contained in:
Juan B. Rodriguez 2024-03-19 14:34:35 -05:00 committed by GitHub
parent f904d9d062
commit 49d1fe0e11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 55 additions and 4 deletions

11
test/fixtures/account/cryptos.yml vendored Normal file
View file

@ -0,0 +1,11 @@
# Read about fixtures at https://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
# This model initially had no columns defined. If you add columns to the
# model remove the "{}" from the fixture names and add the columns immediately
# below each fixture, per the syntax in the comments below
#
# one: {}
# column: value
#
# two: {}
# column: value

View file

@ -0,0 +1,7 @@
require "test_helper"
class Account::CryptoTest < ActiveSupport::TestCase
# test "the truth" do
# assert true
# end
end

View file

@ -39,12 +39,12 @@ class TimeSeriesTest < ActiveSupport::TestCase
expected_values = {
values: [
{
date: "2024-03-17",
date: 1.day.ago.to_date,
value: { amount: "100.0", currency: "USD" },
trend: { type: "normal", direction: "flat", value: { amount: "0.0", currency: "USD" }, percent: 0.0 }
},
{
date: "2024-03-18",
date: Date.current,
value: { amount: "200.0", currency: "USD" },
trend: { type: "normal", direction: "up", value: { amount: "100.0", currency: "USD" }, percent: 100.0 }
}