Commits

Anonymous committed 26ea390

RPC client returns binaries, not strings

Comments (0)

Files changed (1)

test/amq_interface_test.erl

 
 submit_create_command_test() ->
     Response = send_request("create exchange myexchange;"),
-    ?assertEqual("{\"success\":true,\"messages\":[\"ok\"]}", Response).
+    ?assertEqual(<<"{\"success\":true,\"messages\":[\"ok\"]}">>, Response).
 
 submit_query_test() ->
     Response = send_request("select * from vhosts where name='/';"),
-    ?assertEqual("{\"success\":true,\"messages\":[[{\"name\":\"/\"}]]}", Response).
+    ?assertEqual(<<"{\"success\":true,\"messages\":[[{\"name\":\"/\"}]]}">>, Response).
 
 submit_badly_formatted_query_test() ->
     Response = send_request("create invalidexchange myexchange;"),
-    ?assertEqual("{\"success\":false,\"message\":\"syntax error before: \\\"invalidexchange\\\" on line 1\"}", Response).
+    ?assertEqual(<<"{\"success\":false,\"message\":\"syntax error before: \\\"invalidexchange\\\" on line 1\"}">>, Response).
 
 submit_query_against_non_existant_object_test() ->
     Response = send_request("select * from something;"),
-    ?assertEqual("{\"success\":true,\"messages\":[\"Unknown entity something specified to query\"]}", Response).
+    ?assertEqual(<<"{\"success\":true,\"messages\":[\"Unknown entity something specified to query\"]}">>, Response).
 
 send_request(Content) ->
     Connection = Connection = amqp_connection:start_direct(#amqp_params{}),