mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 12:05:19 +02:00
Fix spacing in time series tests
This commit is contained in:
parent
e175aa9b49
commit
3c4bdb6bef
2 changed files with 8 additions and 7 deletions
|
@ -60,12 +60,12 @@ class TimeSeriesTest < ActiveSupport::TestCase
|
|||
|
||||
test "numeric series can be serialized to json" do
|
||||
expected_values = {
|
||||
values: [
|
||||
{ date: 1.day.ago.to_date, value: 100, trend: { type: "normal", direction: "flat", value: 0, percent: 0.0 } },
|
||||
{ date: Date.current, value: 200, trend: { type: "normal", direction: "up", value: 100, percent: 100.0 } }
|
||||
],
|
||||
trend: { type: "normal", direction: "up", value: 100, percent: 100.0 },
|
||||
type: "normal"
|
||||
values: [
|
||||
{ date: 1.day.ago.to_date, value: 100, trend: { type: "normal", direction: "flat", value: 0, percent: 0.0 } },
|
||||
{ date: Date.current, value: 200, trend: { type: "normal", direction: "up", value: 100, percent: 100.0 } }
|
||||
],
|
||||
trend: { type: "normal", direction: "up", value: 100, percent: 100.0 },
|
||||
type: "normal"
|
||||
}.to_json
|
||||
|
||||
series = TimeSeries.new([ { date: 1.day.ago.to_date, value: 100 }, { date: Date.current, value: 200 } ])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue