pleroma/test
Ilja 6ba93c2cb3 Fix test get_user_apps/1
For some reason I had a test who suddenly failed, mix test test/pleroma/web/o_auth/app_test.exs:54. A user has a list of applications and this test adds them and then sees if the list it gets back is the same as the apps it added.

When I ran mix test a day before I didn't have this problem and when I pushed code today in a different MR, the pipeline succeeded (see https://git.pleroma.social/ilja/pleroma/-/jobs/205827), yet locally it failed. So it seems the test can sometimes succeed and sometimes fail, which makes it untrustworthy.

The failure I see is because the returned list is in reverse order. I assume that's not per sé wrong. You just want to know if the apps you added are actually there. I fixed the test by first ordering the lists before comparing.

AFAICT (and as far as that's relevant) the test got introduced in commit cb2a072e62
2022-02-22 18:56:26 +01:00
..
config Load an emoji.txt specific to the test env 2021-02-03 16:40:59 -06:00
credo/check/consistency Bump Copyright to 2021 2021-01-13 07:49:50 +01:00
fixtures Add tests for mismatched context in replies 2022-02-02 12:19:35 -06:00
instance_static support for special chars in pack name 2020-09-24 09:12:37 +03:00
mix Upgrade Ecto to v3.6.2, remove deprecated ecto_explain 2021-06-23 13:22:32 -05:00
pleroma Fix test get_user_apps/1 2022-02-22 18:56:26 +01:00
support Add tests for mismatched context in replies 2022-02-02 12:19:35 -06:00
test_helper.exs Skip erratic tests 2021-12-21 22:04:15 -06:00