Rewrite and expand EUnit suite; run unit tests in CI from shared test image. Refs EventHub/EventHubBack#36 [skip ci]
This commit is contained in:
@@ -25,7 +25,12 @@ ws_handler_test_() ->
|
||||
|
||||
test_websocket_info_booking() ->
|
||||
State = #state{user_id = <<"user123">>, subscriptions = []},
|
||||
Data = #{booking_id => <<"book123">>, event_id => <<"ev123">>, status => confirmed},
|
||||
Data = #{
|
||||
user_id => <<"user123">>,
|
||||
booking_id => <<"book123">>,
|
||||
event_id => <<"ev123">>,
|
||||
status => confirmed
|
||||
},
|
||||
Msg = {notification, booking_update, Data},
|
||||
|
||||
case ws_handler:websocket_info(Msg, State) of
|
||||
@@ -58,4 +63,4 @@ test_websocket_info_event() ->
|
||||
Decoded = jsx:decode(Reply, [return_maps]),
|
||||
?assertEqual(<<"event_update">>, maps:get(<<"type">>, Decoded));
|
||||
_ -> ?assert(false, "Expected reply")
|
||||
end.
|
||||
end.
|
||||
|
||||
Reference in New Issue
Block a user