diff --git a/app/soapbox/__fixtures__/group-truthsocial.json b/app/soapbox/__fixtures__/group-truthsocial.json new file mode 100644 index 000000000..f874f6892 --- /dev/null +++ b/app/soapbox/__fixtures__/group-truthsocial.json @@ -0,0 +1,16 @@ +{ + "note": "patriots 900000001", + "discoverable": true, + "id": "109989480368015378", + "domain": null, + "avatar": "https://media.covfefe.social/groups/avatars/109/989/480/368/015/378/original/50b0d899bc5aae13.jpg", + "avatar_static": "https://media.covfefe.social/groups/avatars/109/989/480/368/015/378/original/50b0d899bc5aae13.jpg", + "header": "https://media.covfefe.social/groups/headers/109/989/480/368/015/378/original/c5063b59f919cd4a.png", + "header_static": "https://media.covfefe.social/groups/headers/109/989/480/368/015/378/original/c5063b59f919cd4a.png", + "group_visibility": "everyone", + "created_at": "2023-03-08T00:00:00.000Z", + "display_name": "PATRIOT PATRIOTS", + "membership_required": true, + "members_count": 1, + "tags": [] +} \ No newline at end of file diff --git a/app/soapbox/schemas/__tests__/group.test.ts b/app/soapbox/schemas/__tests__/group.test.ts new file mode 100644 index 000000000..9cdfb66d9 --- /dev/null +++ b/app/soapbox/schemas/__tests__/group.test.ts @@ -0,0 +1,7 @@ +import { groupSchema } from '../group'; + +test('groupSchema with a TruthSocial group', () => { + const data = require('soapbox/__fixtures__/group-truthsocial.json'); + const group = groupSchema.parse(data); + expect(group.display_name_html).toEqual('PATRIOT PATRIOTS'); +}); \ No newline at end of file