@@ -14,6 +14,8 @@ import { AuthService } from '../../../core/auth/auth.service';
1414import { AuthServiceStub } from '../../../shared/testing/auth-service.stub' ;
1515import { of } from 'rxjs' ;
1616import { Feedback } from '../../../core/feedback/models/feedback.model' ;
17+ import { Router } from '@angular/router' ;
18+ import { RouterMock } from '../../../shared/mocks/router.mock' ;
1719
1820
1921describe ( 'FeedbackFormComponent' , ( ) => {
@@ -29,6 +31,7 @@ describe('FeedbackFormComponent', () => {
2931 return of ( EPersonMock ) ;
3032 }
3133 } ) ;
34+ const routerStub = new RouterMock ( ) ;
3235
3336 beforeEach ( waitForAsync ( ( ) => {
3437 TestBed . configureTestingModule ( {
@@ -40,6 +43,7 @@ describe('FeedbackFormComponent', () => {
4043 { provide : NotificationsService , useValue : notificationService } ,
4144 { provide : FeedbackDataService , useValue : feedbackDataServiceStub } ,
4245 { provide : AuthService , useValue : authService } ,
46+ { provide : Router , useValue : routerStub } ,
4347 ] ,
4448 schemas : [ NO_ERRORS_SCHEMA ]
4549 } ) . compileComponents ( ) ;
@@ -57,7 +61,7 @@ describe('FeedbackFormComponent', () => {
5761 } ) ;
5862
5963 it ( 'should have page value' , ( ) => {
60- expect ( de . query ( By . css ( 'input[name=page]' ) ) . nativeElement . value ) . toEqual ( '/home' ) ;
64+ expect ( component . feedbackForm . controls . page . value ) . toEqual ( '/home' ) ;
6165 } ) ;
6266
6367 it ( 'should have email if ePerson' , ( ) => {
0 commit comments