Skip to content

Commit

Permalink
refactor test_get_events_by_id a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
toy authored and kinow committed Mar 6, 2021
1 parent 028ed90 commit 4a40bfe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/app_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ def test_get_events_by_id
assert_equal 200, last_response.status

events = last_response.body.split(/\n+/) # two events, printed with blank lines separating them
synergy_event = parse_data(events[0])
valuation_event = parse_data(events[1])
assert_equal ['synergy', 3], [synergy_event['id'], synergy_event['value']]
assert_equal %w[valuation a], [valuation_event['id'], valuation_event['value']]
assert_equal 2, events.length

assert_equal ['synergy', 3], parse_data(events[0]).values_at('id', 'value')
assert_equal %w[valuation a], parse_data(events[1]).values_at('id', 'value')
end
end

Expand Down

0 comments on commit 4a40bfe

Please sign in to comment.