diff options
-rw-r--r-- | src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts b/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts index ea97439..712d1bf 100644 --- a/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts +++ b/src/app/vnfs/userlogin-form/userlogin-form.component.spec.ts @@ -102,5 +102,12 @@ describe('userloginFormComponent', () => { expect(localStorage['userId']).toBe('test Usr'); })); + it('test validateUserName function', () => { + component.userId = ''; + component.validateUserName(); + expect(component.errorMessage).toEqual(''); + expect(component.invalid).toEqual(true); + }); + }); |