USER_FIRST_NAME_KEY,
USER_LAST_NAME_KEY,
USER_OWNER_UUID_KEY,
- USER_UUID_KEY
+ USER_UUID_KEY,
+ USER_IS_ADMIN
} from "~/services/auth-service/auth-service";
import 'jest-localstorage-mock';
localStorage.setItem(USER_LAST_NAME_KEY, "Doe");
localStorage.setItem(USER_UUID_KEY, "uuid");
localStorage.setItem(USER_OWNER_UUID_KEY, "ownerUuid");
+ localStorage.setItem(USER_IS_ADMIN, JSON.stringify("false"));
store.dispatch(initAuth());
expect(store.getState().auth).toEqual({
apiToken: "token",
+ sshKeys: [],
user: {
email: "test@test.com",
firstName: "John",
lastName: "Doe",
uuid: "uuid",
- ownerUuid: "ownerUuid"
+ ownerUuid: "ownerUuid",
+ isAdmin: false
}
});
});