Add tests for avatars, banners and more #102

Merged
dessalines merged 1 commits from more-tests into main 2020-09-17 18:22:08 +00:00
Owner

This should cover all the important fields, but its entirely possible that I missed something. All tests are passing for me.

This should cover all the important fields, but its entirely possible that I missed something. All tests are passing for me.
dessalines reviewed 2020-09-17 17:45:40 +00:00
@ -47,0 +54,4 @@
expect(commentOne.content).toBe(commentTwo.content);
expect(commentOne.creator_name).toBe(commentTwo.creator_name);
expect(commentOne.community_actor_id).toBe(commentTwo.community_actor_id);
expect(commentOne.published).toBe(commentTwo.published);
Owner

I'm a little bit worried about published here, but its probably being set manually, so its fine. The test would fail otherwise.

I'm a little bit worried about published here, but its probably being set manually, so its fine. The test would fail otherwise.
dessalines reviewed 2020-09-17 17:45:40 +00:00
@ -47,0 +54,4 @@
expect(commentOne.content).toBe(commentTwo.content);
expect(commentOne.creator_name).toBe(commentTwo.creator_name);
expect(commentOne.community_actor_id).toBe(commentTwo.community_actor_id);
expect(commentOne.published).toBe(commentTwo.published);
Owner

I'm a little bit worried about published here, but its probably being set manually, so its fine. The test would fail otherwise.

I'm a little bit worried about published here, but its probably being set manually, so its fine. The test would fail otherwise.
dessalines reviewed 2020-09-17 17:46:27 +00:00
@ -18,0 +33,4 @@
expect(communityOne.category_id).toBe(communityTwo.category_id);
expect(communityOne.removed).toBe(communityTwo.removed);
expect(communityOne.deleted).toBe(communityTwo.deleted);
}
Owner

Good idea on these helper functions.

Good idea on these helper functions.
dessalines reviewed 2020-09-17 17:47:34 +00:00
@ -41,0 +47,4 @@
expect(postOne.ap_id).toBe(postTwo.ap_id);
expect(postOne.name).toBe(postTwo.name);
expect(postOne.body).toBe(postTwo.body);
expect(postOne.url).toBe(postTwo.url);
Owner

These are sometimes both undefined, but hopefully the check is done correctly.

These are sometimes both undefined, but hopefully the check is done correctly.
dessalines reviewed 2020-09-17 17:48:00 +00:00
@ -41,0 +52,4 @@
expect(postOne.embed_title).toBe(postTwo.embed_title);
expect(postOne.embed_description).toBe(postTwo.embed_description);
expect(postOne.embed_html).toBe(postTwo.embed_html);
expect(postOne.published).toBe(postTwo.published);
Owner

Published time worries me a bit here too.

Published time worries me a bit here too.
Owner

It passed.

It passed.
dessalines merged commit fc525c8144 into main 2020-09-17 18:22:08 +00:00
Sign in to join this conversation.
No reviewers
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: LemmyNet/lemmy#102
No description provided.