Skip to content

Commit

Permalink
add test to check discards backend errors p.287 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Aug 11, 2019
1 parent 53a4fd4 commit 6aea929
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/info_sys/test/info_sys_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,14 @@ defmodule InfoSysTest do
test "compute/2 with no backend results" do
assert [] = InfoSys.compute("none", backends: [TestBackend])
end

test "compute/2 with timeout returns no results" do
results = InfoSys.compute("timeout", backends: [TestBackend, timeout: 10])
assert results == []
end
end

@tag :capture_log
test "compute/2 discards backend errors" do
assert InfoSys.compute("boom", backends: [TestBackend]) == []
end

0 comments on commit 6aea929

Please sign in to comment.