File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,10 @@ defmodule Cadet.Jobs.LogEntryTest do
2020 test "returns true (job runs) when log entry old enough" do
2121 % LogEntry {
2222 name: @ name ,
23- last_run: Timex . subtract ( DateTime . truncate ( Timex . now ( ) , :second ) , Duration . from_hours ( 25 ) )
23+ last_run:
24+ Timex . now ( )
25+ |> Timex . subtract ( Duration . from_hours ( 25 ) )
26+ |> DateTime . truncate ( :second )
2427 }
2528 |> Repo . insert! ( )
2629
@@ -37,7 +40,10 @@ defmodule Cadet.Jobs.LogEntryTest do
3740 test "returns false (job does not run) when log entry too recent" do
3841 % LogEntry {
3942 name: @ name ,
40- last_run: Timex . subtract ( DateTime . truncate ( Timex . now ( ) , :second ) , Duration . from_hours ( 23 ) )
43+ last_run:
44+ Timex . now ( )
45+ |> Timex . subtract ( Duration . from_hours ( 23 ) )
46+ |> DateTime . truncate ( :second )
4147 }
4248 |> Repo . insert! ( )
4349
You can’t perform that action at this time.
0 commit comments