Skip to content

Commit

Permalink
add stub HTTPClient p.289 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsonic committed Aug 11, 2019
1 parent 357a8d8 commit 9ece330
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions apps/info_sys/test/backends/http_client.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
defmodule InfoSys.Test.HTTPClient do
@wolfram_xml File.read!("test/fixtures/wolfram.xml")
def request(url) do
url = to_string(url)
cond do
String.contains?(url, "1+%2B+1") -> {:ok, {[], [], @wolfram_xml}}
true -> {:ok, {[], [], "<queryresult></queryresult>"}}
end
end
end

0 comments on commit 9ece330

Please sign in to comment.