Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
gabmontes committed Jun 3, 2024
1 parent b98c721 commit 196d628
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions apps/block_scout_web/test/test_helper.exs
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,19 @@ Ecto.Adapters.SQL.Sandbox.mode(Explorer.Repo.Filecoin, :manual)
Absinthe.Test.prime(BlockScoutWeb.Schema)

Mox.defmock(EthereumJSONRPC.Mox, for: EthereumJSONRPC.Transport)
# require Explorer.MoxSetup
# Explorer.MoxSetup.setup_mocks()

IO.puts("1 ************************************************************* setup_mocks")

# Mock the calls to json_rpc/2 expected during the tests
Mox.stub(
EthereumJSONRPC.Mox,
:json_rpc,
fn %{method: "optimism_btcFinalityByBlockHash"}, _ ->
IO.puts("2 ************************************************************* call!")
{:ok, %{btc_finality: -9}}
end
)

Mox.defmock(BlockScoutWeb.TestCaptchaHelper, for: BlockScoutWeb.CaptchaHelper)

0 comments on commit 196d628

Please sign in to comment.