From 7211d1163b26406484c5439ae53a190629cda108 Mon Sep 17 00:00:00 2001 From: Bharanee Rathna Date: Mon, 10 Jun 2019 10:43:03 +1000 Subject: [PATCH] error passthrough test - check return values. --- test/readonly_reconnect_test.exs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/test/readonly_reconnect_test.exs b/test/readonly_reconnect_test.exs index dd5b7eb4..98030279 100644 --- a/test/readonly_reconnect_test.exs +++ b/test/readonly_reconnect_test.exs @@ -33,11 +33,8 @@ defmodule ReadonlyReconnectTest do assert redis == pid end - test "pass through other errors", %{redis: redis} do - Exq.Redis.Connection.q(:testredis, ["GETS", "key"]) - refute_received({:EXIT, pid, :killed}) - - Exq.Redis.Connection.qp(:testredis, [["GETS", "key"]]) - refute_received({:EXIT, pid, :killed}) + test "pass through other errors" do + assert {:error, %Redix.Error{}} = Exq.Redis.Connection.q(:testredis, ["GETS", "key"]) + assert {:ok, [%Redix.Error{}]} = Exq.Redis.Connection.qp(:testredis, [["GETS", "key"]]) end end