Files
talk/src/core/client/admin/mutations/SetAuthViewMutation.spec.ts
T
KiwiandWyatt Johnson 7e8ef2189d [next] Admin Authentication (#2155)
* feat: Support sign in via E-Mail, and social logins + permission check

* feat: no permission info

* test: unit test

* test: fix remaining tests

* test: add integration tests

* feat: add admin account completion

* test: auth completion feature tests

* fix: translation

* fix: comment marker design

* fix: linting issues

* chore: address pr review comments

* chore: add comment
2019-02-04 21:26:41 +00:00

22 lines
548 B
TypeScript

import { Environment, RecordSource } from "relay-runtime";
import { LOCAL_ID } from "talk-framework/lib/relay";
import { createRelayEnvironment } from "talk-framework/testHelpers";
import { commit } from "./SetAuthViewMutation";
let environment: Environment;
const source: RecordSource = new RecordSource();
beforeAll(() => {
environment = createRelayEnvironment({
source,
});
});
it("Sets view", () => {
const view = "SIGN_IN";
commit(environment, { view }, {} as any);
expect(source.get(LOCAL_ID)!.authView).toEqual(view);
});