1
0
Fork 0
mirror of https://github.com/edgurgel/httparrot synced 2025-04-05 00:02:41 -04:00
httparrot/test/retrieve_request_handler_tests.exs
2024-06-25 21:23:13 +12:00

17 lines
457 B
Elixir

defmodule HTTParrot.RetrieveRequestHandlerTests do
use ExUnit.Case
import :meck
import HTTParrot.RetrieveRequestHandler
setup do
HTTParrot.RequestStore.clear(:test)
on_exit(fn -> unload() end)
:ok
end
test "returns saved requests" do
expect(:cowboy_req, :binding, [:key, :req1], {:test, :req1})
HTTParrot.RequestStore.store(:test, :req1)
assert retrieve_stored(:req1, :state) == {"[\"req1\"]", :req1, :state}
end
end