Skip to content
This repository has been archived by the owner on Feb 25, 2024. It is now read-only.

Commit

Permalink
unittest fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EMokross committed Jan 19, 2021
1 parent eb3bf2e commit a7719b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/services/link/link-builder.supplier.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {NoSuchElementError} from "../../error/errors";
describe("An installation link supplier", () => {

const mockConfigProvider: ConfigProvider = <ConfigProvider>{
loadInstallation: (installationId: number): Promise<ILIASInstallation> => undefined
loadInstallation: (installationId: number): Promise<Optional<ILIASInstallation>> => Promise.resolve(Optional.empty())
};

const mockUserRepository: UserRepository = <UserRepository>{
Expand Down Expand Up @@ -66,7 +66,7 @@ describe("An installation link supplier", () => {
.and.returnValue(Promise.resolve(Optional.of(user)));

spyOn(mockConfigProvider, "loadInstallation")
.and.returnValue(Promise.resolve(installation));
.and.returnValue(Promise.resolve(Optional.of(installation)));

await expectAsync(subject.get())
.toBeResolvedTo(installation.url);
Expand Down

0 comments on commit a7719b2

Please sign in to comment.