instance.reachable?: Limit to binary input
[akkoma] / test / pleroma / instances_test.exs
index d2618025c0bbdde67b4d25823790eb4963d7c71e..5d0ce623758922d279324b4957d924909e377a92 100644 (file)
@@ -32,9 +32,9 @@ defmodule Pleroma.InstancesTest do
       assert Instances.reachable?(URI.parse(url).host)
     end
 
-    test "returns true on non-binary input" do
-      assert Instances.reachable?(nil)
-      assert Instances.reachable?(1)
+    test "raises FunctionClauseError exception on non-binary input" do
+      assert_raise FunctionClauseError, fn -> Instances.reachable?(nil) end
+      assert_raise FunctionClauseError, fn -> Instances.reachable?(1) end
     end
   end