pleroma/test
Phantasm 7c13abb3d9
Elixir 1.18 Use NaiveDateTime.compare/2 instead of <>= comparisons
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
2025-05-14 16:37:43 +02:00
..
config Load an emoji.txt specific to the test env 2021-02-03 16:40:59 -06:00
credo/check/consistency Revert "Merge branch 'copyright-bump' into 'develop'" 2023-01-02 20:38:50 +00:00
fixtures Merge branch 'more-emoji-likes' into 'develop' 2025-03-20 09:12:09 +00:00
instance_static support for special chars in pack name 2020-09-24 09:12:37 +03:00
mix Merge branch and resolve conflict in database_test.exs 2025-02-25 16:23:46 +04:00
pleroma Elixir 1.18 Use NaiveDateTime.compare/2 instead of <>= comparisons 2025-05-14 16:37:43 +02:00
support Merge branch 'translate-posts' into 'develop' 2025-03-20 09:11:57 +00:00
test_helper.exs Elixir 1.18 Deal with :warnings_as_errors deprecation in compiler_options/1 2025-05-13 14:02:47 +02:00