diff --git a/test/alerts/alerts_test.exs b/test/alerts/alerts_test.exs index 2dd647cfaf..cf4ad6e423 100644 --- a/test/alerts/alerts_test.exs +++ b/test/alerts/alerts_test.exs @@ -113,7 +113,7 @@ defmodule AlertsTest do describe "diversion?/1" do test "returns true when created at is before active period" do created_at = Timex.now() - active_period = [Timex.shift(created_at, days: 1), Timex.shift(created_at, days: 2)] + active_period = [{Timex.shift(created_at, days: 1), Timex.shift(created_at, days: 2)}] alert = Factories.Alerts.Alert.build(:alert, @@ -127,7 +127,7 @@ defmodule AlertsTest do test "returns false when created at is after active period" do created_at = Timex.now() - active_period = [Timex.shift(created_at, days: -2), Timex.shift(created_at, days: -1)] + active_period = [{Timex.shift(created_at, days: -2), Timex.shift(created_at, days: -1)}] alert = Factories.Alerts.Alert.build(:alert, diff --git a/test/support/factories/alerts/alert.ex b/test/support/factories/alerts/alert.ex index 5718199818..10e18fd532 100644 --- a/test/support/factories/alerts/alert.ex +++ b/test/support/factories/alerts/alert.ex @@ -11,7 +11,7 @@ defmodule Test.Support.Factories.Alerts.Alert do def alert_factory do %Alert{ id: :rand.uniform(999) |> Integer.to_string(), - active_period: [Faker.DateTime.forward(1), Faker.DateTime.forward(2)], + active_period: [{Faker.DateTime.forward(1), Faker.DateTime.forward(2)}], banner: Faker.Lorem.Shakespeare.king_richard_iii(), cause: Faker.Lorem.Shakespeare.king_richard_iii(), created_at: Timex.now(),