Add unit test to check state when user tries to delete a role.

This commit is contained in:
Kia Lam
2019-03-13 14:44:12 -04:00
parent 3b65068258
commit 198dfe7f2e
3 changed files with 59 additions and 42 deletions

View File

@@ -8,17 +8,13 @@ const mockAPIAccessList = {
foo: 'bar',
};
const mockGetOrganzationAccessList = jest.fn(() => (
Promise.resolve(mockAPIAccessList)
));
const mockGetOrganzationAccessList = () => Promise.resolve(mockAPIAccessList);
const mockResponse = {
status: 'success',
};
const mockRemoveRole = jest.fn(() => (
Promise.resolve(mockResponse)
));
const mockRemoveRole = () => Promise.resolve(mockResponse);
describe('<OrganizationAccess />', () => {
test('initially renders succesfully', () => {