16735: Added test for non existing method 16735-Require-password-login
authorDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Mon, 24 Aug 2020 13:52:38 +0000 (15:52 +0200)
committerDaniel Kutyła <daniel.kutyla@contractors.roche.com>
Mon, 24 Aug 2020 13:52:38 +0000 (15:52 +0200)
Arvados-DCO-1.1-Signed-off-by: Daniel Kutyła <daniel.kutyla@contractors.roche.com>

src/views/login-panel/login-panel.test.tsx

index c716433e2239f68fa904181e4e3b915758e79912..b490acd93cabc2425d53e56b79b8e9fef545853c 100644 (file)
@@ -113,5 +113,24 @@ describe('<LoginPanel />', () => {
             // then
             expect(result).toBeTruthy();
         });
+
+        it('should return false for not specified config option config.clusterConfig.Login.NOT_EXISTING.Enable', () => {
+            // given
+            const config = {
+                clusterConfig: {
+                    Login: {
+                        NOT_EXISTING: {
+                            Enable: true
+                        },
+                    },
+                },
+            };
+
+            // when
+            const result = requirePasswordLogin(config);
+
+            // then
+            expect(result).toBeFalsy();
+        });
     });
 });
\ No newline at end of file