pleroma/test/pleroma/web
Ilja 28c37dc386
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-03-19 16:57:38 +01:00
..
activity_pub Update copyright, also 2022-02-12 11:53:32 -06:00
admin_api Update copyright, also 2022-02-12 11:53:32 -06:00
api_spec Update copyright, also 2022-02-12 11:53:32 -06:00
auth Update copyright, also 2022-02-12 11:53:32 -06:00
common_api Update copyright, also 2022-02-12 11:53:32 -06:00
endpoint Update copyright, also 2022-02-12 11:53:32 -06:00
feed Update copyright, also 2022-02-12 11:53:32 -06:00
mastodon_api Update copyright, also 2022-02-12 11:53:32 -06:00
media_proxy Update copyright, also 2022-02-12 11:53:32 -06:00
metadata Update copyright, also 2022-02-12 11:53:32 -06:00
o_auth Fix test get_user_apps/1 2022-03-19 16:57:38 +01:00
o_status Revert "Merge branch 'revert/notice-routes' into 'develop'" 2022-03-05 00:34:01 +01:00
pleroma_api Update copyright, also 2022-02-12 11:53:32 -06:00
plugs Revert "Merge branch 'revert/notice-routes' into 'develop'" 2022-03-05 00:34:01 +01:00
preload/providers Update copyright, also 2022-02-12 11:53:32 -06:00
push Update copyright, also 2022-02-12 11:53:32 -06:00
rich_media Update copyright, also 2022-02-12 11:53:32 -06:00
static_fe Update copyright, also 2022-02-12 11:53:32 -06:00
twitter_api Update copyright, also 2022-02-12 11:53:32 -06:00
views Update copyright, also 2022-02-12 11:53:32 -06:00
web_finger Update copyright, also 2022-02-12 11:53:32 -06:00
common_api_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
fallback_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
federator_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
manifest_controller_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
media_proxy_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
mongoose_im_controller_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
node_info_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
rel_me_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
shout_channel_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
streamer_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
uploader_controller_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00
web_finger_test.exs Update copyright, also 2022-02-12 11:53:32 -06:00