Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Stop using Double in cache store tests (#2854)
hq1b8e96b948feb
diff --git a/test/plausible/session/cache_store_test.exs b/test/plausible/session/cache_store_test.exsindex 265d17df48..6b8d212700 100644--- a/test/plausible/session/cache_store_test.exs+++ b/test/plausible/session/cache_store_test.exs@@ -1,14 +1,16 @@defmodule Plausible.Session.CacheStoreTest douse Plausible.DataCase- import Double- alias Plausible.Session.{CacheStore, WriteBuffer}+ alias Plausible.Session.CacheStore- setup do- buffer =- WriteBuffer- |> stub(:insert, fn _sessions -> nil end)+ defmodule FakeBuffer do+ def insert(sessions) do+ send(self(), {WriteBuffer, :insert, [sessions]})+ {:ok, sessions}+ end+ end- [buffer: buffer]+ setup do+ [buffer: FakeBuffer]endtest "creates a session from an event", %{buffer: buffer} do