move ssh form interface from model to action
[arvados-workbench2.git] / src / store / auth / auth-reducer.test.ts
index 8eeb7c3c636152c9087b868cd01ca71b1678c9df..1202bacb125b5e1afc61908cb64f9953946b41f6 100644 (file)
@@ -7,13 +7,19 @@ import { AuthAction, authActions } from "./auth-action";
 
 import 'jest-localstorage-mock';
 import { createServices } from "~/services/services";
+import { mockConfig } from '~/common/config';
+import { ApiActions } from "~/services/api/api-actions";
 
 describe('auth-reducer', () => {
     let reducer: (state: AuthState | undefined, action: AuthAction) => any;
+    const actions: ApiActions = {
+        progressFn: (id: string, working: boolean) => {},
+        errorFn: (id: string, message: string) => {}
+    };
 
     beforeAll(() => {
         localStorage.clear();
-        reducer = authReducer(createServices({ apiHost: "/arvados/v1", keepWebHost: "" }));
+        reducer = authReducer(createServices(mockConfig({}), actions));
     });
 
     it('should correctly initialise state', () => {