Skip to content

Commit

Permalink
refactor(shared): fix firestore tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mkue committed Jan 19, 2024
1 parent d511f47 commit 3872026
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion seed/auth_export/accounts.json

Large diffs are not rendered by default.

Binary file not shown.
Binary file modified seed/firestore_export/all_namespaces/all_kinds/output-0
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions shared/tests/firestore.rules.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ beforeAll(async () => {
.authenticatedContext('recipient_app', { phone_number: '+23225000501' })
.firestore();
userAppAccess = testEnvironment
.authenticatedContext('JfPfN1qsdomTcpk9meUh5FnRxY18', { email: 'test@example.com' })
.authenticatedContext('w43IydQbr8lgeGeevbSBoP9ui3WQ', { email: 'test@test.org' })
.firestore();
});

Expand Down Expand Up @@ -106,7 +106,7 @@ describe('Test user access', () => {
// Access own user document
const userDocsAllowed = await getDoc(doc(userAppAccess, USER_FIRESTORE_PATH, 'cCj3O9gQuopmPZ15JTI0'));
expect(userDocsAllowed.exists()).toBe(true);
expect(userDocsAllowed.get('auth_user_id')).toBe('JfPfN1qsdomTcpk9meUh5FnRxY18');
expect(userDocsAllowed.get('auth_user_id')).toBe('w43IydQbr8lgeGeevbSBoP9ui3WQ');

// Access other user document (not allowed)
await assertFails(getDoc(doc(userAppAccess, USER_FIRESTORE_PATH, 'EgDWTYqz7zNyQ4CdxieW')));
Expand Down

0 comments on commit 3872026

Please sign in to comment.