Skip to content

Commit

Permalink
invoke TestBackend (mocks) p.285 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Aug 11, 2019
1 parent 6a82924 commit 53a4fd4
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions apps/info_sys/test/info_sys_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,13 @@ defmodule InfoSysTest do
raise "boom!"
end
end

test "compute/2 with backend results" do
assert [%Result{backend: TestBackend, text: "result"}] =
InfoSys.compute("result", backends: [TestBackend])
end

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

0 comments on commit 53a4fd4

Please sign in to comment.