aprs.me/test/support/mock_helpers.ex
2025-06-23 11:01:32 -05:00

18 lines
648 B
Elixir

defmodule Aprs.MockHelpers do
@moduledoc """
Provides mocks and stubs for tests.
"""
def stub_packets_mock do
Mox.stub(PacketsMock, :get_historical_packet_count, fn _opts -> 0 end)
Mox.stub(PacketsMock, :stream_packets_for_replay, fn _opts -> [] end)
Mox.stub(PacketsMock, :get_packets_for_replay, fn _opts -> [] end)
Mox.stub(PacketsMock, :get_recent_packets, fn _opts -> [] end)
Mox.stub(PacketsMock, :clean_old_packets, fn -> {:ok, 0} end)
Mox.stub(PacketsMock, :clean_packets_older_than, fn _days -> {:ok, 0} end)
end
def stub_badpackets_mock do
Mox.stub_with(BadPacketsMock, BadPacketsStub)
end
end