add missing expect helper functions to historical_packets_test
This commit is contained in:
parent
9b7ab75f31
commit
9f4369771d
1 changed files with 27 additions and 0 deletions
|
|
@ -4,6 +4,15 @@ defmodule Aprs.Integration.HistoricalPacketsTest do
|
|||
import Aprs.MockHelpers
|
||||
import Phoenix.LiveViewTest
|
||||
|
||||
# Helper functions for mocking
|
||||
defp expect_packets_for_replay(packets) do
|
||||
Mox.expect(PacketsMock, :get_packets_for_replay, fn _opts -> packets end)
|
||||
end
|
||||
|
||||
defp expect_packets_for_replay_with_bounds(packets) do
|
||||
Mox.expect(PacketsMock, :get_packets_for_replay, fn _opts -> packets end)
|
||||
end
|
||||
|
||||
setup do
|
||||
Mox.set_mox_global()
|
||||
Application.put_env(:aprs, :packets_module, Aprs.PacketsMock)
|
||||
|
|
@ -12,6 +21,15 @@ defmodule Aprs.Integration.HistoricalPacketsTest do
|
|||
end
|
||||
|
||||
describe "historical packet loading" do
|
||||
# Helper functions for mocking
|
||||
defp expect_packets_for_replay(packets) do
|
||||
Mox.expect(PacketsMock, :get_packets_for_replay, fn _opts -> packets end)
|
||||
end
|
||||
|
||||
defp expect_packets_for_replay_with_bounds(packets) do
|
||||
Mox.expect(PacketsMock, :get_packets_for_replay, fn _opts -> packets end)
|
||||
end
|
||||
|
||||
setup do
|
||||
# Create test packets with different timestamps
|
||||
now = DateTime.utc_now()
|
||||
|
|
@ -250,6 +268,15 @@ defmodule Aprs.Integration.HistoricalPacketsTest do
|
|||
end
|
||||
|
||||
describe "live packet updates with historical data" do
|
||||
# Helper functions for mocking
|
||||
defp expect_packets_for_replay(packets) do
|
||||
Mox.expect(PacketsMock, :get_packets_for_replay, fn _opts -> packets end)
|
||||
end
|
||||
|
||||
defp expect_packets_for_replay_with_bounds(packets) do
|
||||
Mox.expect(PacketsMock, :get_packets_for_replay, fn _opts -> packets end)
|
||||
end
|
||||
|
||||
setup do
|
||||
# Create a historical packet
|
||||
now = DateTime.utc_now()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue