Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
macobo committed Nov 20, 2024
1 parent 19987ca commit db34e53
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/plausible/stats/sampling_cache_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ defmodule Plausible.Stats.SamplingCacheTest do

start_test_cache(test)

assert SamplingCache.count_all() == 1
assert SamplingCache.get(1, force?: true, cache_name: test) == nil
assert SamplingCache.get(2, force?: true, cache_name: test) == 22_000_000
assert SamplingCache.get(3, force?: true, cache_name: test) == nil
Expand All @@ -72,6 +73,8 @@ defmodule Plausible.Stats.SamplingCacheTest do
])

:ok = SamplingCache.refresh_all(cache_name: test)

assert SamplingCache.count_all() == 2
assert SamplingCache.get(1, force?: true, cache_name: test) == 22_000_000
assert SamplingCache.get(2, force?: true, cache_name: test) == 22_000_000
end
Expand Down

0 comments on commit db34e53

Please sign in to comment.