Skip to content

Commit

Permalink
chore: add :verify_on_exit! to tests using Mox (#2147)
Browse files Browse the repository at this point in the history
Adds `:verify_on_exit!` setup calls to tests using Mox to prevent any
missed mock functional call expectations later on.

As suggested by @digitalcora
  #2145 (comment)
  • Loading branch information
sloanelybutsurely authored Aug 20, 2024
1 parent fc405bc commit 7640851
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/screens/alerts/alert_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ defmodule Screens.Alerts.AlertTest do
alias Screens.Alerts.Alert
alias Screens.Routes.Route

setup :verify_on_exit!

defp alert_json(id) do
%{
"id" => id,
Expand Down
2 changes: 2 additions & 0 deletions test/screens/alerts/cache/filter_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ defmodule Screens.Alerts.Cache.FilterTest do
alias Screens.Alerts.Cache.Filter
alias Screens.Routes.Route

setup :verify_on_exit!

describe "build_matchers/1" do
test "passes through empty filters" do
assert [] == Filter.build_matchers(%{})
Expand Down

0 comments on commit 7640851

Please sign in to comment.