Skip to content

Commit

Permalink
On review
Browse files Browse the repository at this point in the history
  • Loading branch information
nityanandaz committed Oct 11, 2023
1 parent 5bf4860 commit bddf9b2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ examples.forEach((activeConversation) => {
});

it('should accept code of conduct', () => {
const spy = jest.spyOn(component.metisConversationService, 'acceptCodeOfConduct');
component.ngOnInit();
const metisSpy = jest.spyOn(metisConversationService, 'acceptCodeOfConduct');
fixture.detectChanges();
component.acceptCodeOfConduct();
expect(spy).toHaveBeenCalledOnce();
expect(metisSpy).toHaveBeenCalledOnce();
});
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ examples.forEach((activeConversation) => {
}));

it('should open code of conduct', () => {
const metisSpy = jest.spyOn(component.metisConversationService, 'setCodeOfConduct');
const metisSpy = jest.spyOn(metisConversationService, 'setCodeOfConduct');
component.openCodeOfConduct();
expect(metisSpy).toHaveBeenCalledOnce();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import { Course, CourseGroup } from 'app/entities/course.model';
import { TextExercise } from 'app/entities/text-exercise.model';
import { Exercise } from 'app/entities/exercise.model';
import { User } from '@sentry/angular-ivy';
import { EntityArrayResponseType, RoleGroup } from 'app/course/manage/course-management.service';
import { UserPublicInfoDTO } from 'app/core/user/user.model';
import { EntityArrayResponseType } from 'app/course/manage/course-management.service';

export class MockCourseManagementService {
mockExercises: Exercise[] = [new TextExercise(undefined, undefined)];
Expand Down Expand Up @@ -42,8 +41,4 @@ export class MockCourseManagementService {
getAll(): Observable<EntityArrayResponseType> {
return of(new HttpResponse({ body: [] }));
}

searchUsers(courseId: number, loginOrName: string, roles: RoleGroup[]): Observable<HttpResponse<UserPublicInfoDTO[]>> {
return of(new HttpResponse({ body: [] }));
}
}

0 comments on commit bddf9b2

Please sign in to comment.