Skip to content

Commit 4a40bfe

Browse files
toykinow
authored andcommitted
refactor test_get_events_by_id a bit
1 parent 028ed90 commit 4a40bfe

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/app_test.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,10 @@ def test_get_events_by_id
9595
assert_equal 200, last_response.status
9696

9797
events = last_response.body.split(/\n+/) # two events, printed with blank lines separating them
98-
synergy_event = parse_data(events[0])
99-
valuation_event = parse_data(events[1])
100-
assert_equal ['synergy', 3], [synergy_event['id'], synergy_event['value']]
101-
assert_equal %w[valuation a], [valuation_event['id'], valuation_event['value']]
98+
assert_equal 2, events.length
99+
100+
assert_equal ['synergy', 3], parse_data(events[0]).values_at('id', 'value')
101+
assert_equal %w[valuation a], parse_data(events[1]).values_at('id', 'value')
102102
end
103103
end
104104

0 commit comments

Comments
 (0)