Skip to content

Commit

Permalink
test(clerk-js): Add snapshots test for OrganizationMembershipRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
panteliselef committed Aug 10, 2023
1 parent bce70b1 commit 1b053a3
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { OrganizationMembershipRequest } from './internal';

describe('OrganizationMembership', () => {
it('has the same initial properties', () => {
const organizationMembershipRequest = new OrganizationMembershipRequest({
object: 'organization_membership_request',
id: 'test_id',
organization_id: 'test_org_id',
status: 'pending',
created_at: 12345,
updated_at: 5678,
public_user_data: {
object: 'public_user_data',
first_name: 'test_first_name',
last_name: 'test_last_name',
profile_image_url: 'test_url',
image_url: 'https://clerk.com',
identifier: 'test@identifier.gr',
id: 'test_user_id',
has_image: true,
},
});

expect(organizationMembershipRequest).toMatchSnapshot();
});
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`OrganizationMembership has the same initial properties 1`] = `
OrganizationMembershipRequest {
"accept": [Function],
"id": "test_id",
"organizationId": "test_org_id",
"pathRoot": "",
"publicUserData": {
"firstName": "test_first_name",
"hasImage": true,
"identifier": "test@identifier.gr",
"imageUrl": "https://clerk.com",
"lastName": "test_last_name",
"profileImageUrl": "test_url",
"userId": undefined,
},
"status": "pending",
}
`;

0 comments on commit 1b053a3

Please sign in to comment.