mirror of
https://github.com/wassname/talk.git
synced 2026-07-15 11:26:58 +08:00
* 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
22 lines
548 B
TypeScript
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);
|
|
});
|