acmucsd/membership-portal

Remove ADMIN accessType usage from tests that have lower-level access types

Opened this issue · 0 comments

Currently, many tests use an admin user to test if specific functionality works for users of higher privilege, but that are not necessarily admins.

For example, in this test: https://github.com/acmucsd/membership-portal/blob/master/tests/merchStore.test.ts#L162 , we are testing that only admins can edit merch collections. But since store managers also have edit permissions on merch collections, we should be create fake users that assume the STORE_MANAGER role vs. the ADMIN role, since presumably, the admin role has access to anything that a higher privileged user has access to.