warning: comparison with structs found:
left <= right
given types:
dynamic() <= dynamic(%NaiveDateTime{})
where "left" (context ExUnit.Assertions) was given the type:
# type: dynamic()
# from: test/pleroma/web/plugs/user_tracking_plug_test.exs:25
left = user.last_active_at
where "right" (context ExUnit.Assertions) was given the type:
# type: dynamic(%NaiveDateTime{})
# from: test/pleroma/web/plugs/user_tracking_plug_test.exs:25
right = NaiveDateTime.truncate(NaiveDateTime.utc_now(), :second)
Comparison operators (>, <, >=, <=, min, and max) perform structural and not semantic comparison. Comparing with a struct won't give meaningful results. Structs that can be compared typically define a compare/2 function within their modules that can be used for semantic comparison.
typing violation found at:
│
25 │ assert user.last_active_at <= NaiveDateTime.truncate(NaiveDateTime.utc_now(), :second)
│ ~
│
└─ test/pleroma/web/plugs/user_tracking_plug_test.exs:25:32: Pleroma.Web.Plugs.UserTrackingPlugTest."test updates last_active_at for a new user"/1