Initial poll refresh support

Implement refreshing the object with an interval and call the function
when getting the poll.
This commit is contained in:
rinpatch 2019-09-18 18:13:21 +03:00
commit 7ef575d11e
8 changed files with 126 additions and 4 deletions

View file

@ -1004,6 +1004,10 @@ defmodule HttpRequestMock do
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/sjw.json")}}
end
def get("https://patch.cx/users/rin", _, _, _) do
{:ok, %Tesla.Env{status: 200, body: File.read!("test/fixtures/tesla_mock/rin.json")}}
end
def get(url, query, body, headers) do
{:error,
"Mock response not implemented for GET #{inspect(url)}, #{query}, #{inspect(body)}, #{