module tests
This commit is contained in:
parent
9ed6c497c0
commit
0099302033
@ -7,7 +7,15 @@ import { PasswordServiceMockModule } from "../test/password.service.mock";
|
||||
import { RightRepositoryMockModule } from "../test/right.repository.mock";
|
||||
import { SessionServiceMockModule } from "../test/session.service.mock";
|
||||
import { TokenServiceMockModule } from "../test/token.service.mock";
|
||||
import { AccountFactoryService, TokenAuthenticationModule } from "../src";
|
||||
import {
|
||||
AccountFactoryService,
|
||||
AccountService,
|
||||
GroupService,
|
||||
LoginService,
|
||||
RegistrationService,
|
||||
RightService,
|
||||
TokenAuthenticationModule,
|
||||
} from "../src";
|
||||
|
||||
describe("TokenAuthenticationModule Tests", () => {
|
||||
let module: TestingModule | null = null;
|
||||
@ -23,13 +31,78 @@ describe("TokenAuthenticationModule Tests", () => {
|
||||
GroupRepositoryMockModule.forRoot(),
|
||||
RightRepositoryMockModule.forRoot(),
|
||||
OrganizationRepositoryMockModule.forRoot(),
|
||||
TokenAuthenticationModule,
|
||||
TokenAuthenticationModule.forRoot(),
|
||||
],
|
||||
}).compile();
|
||||
});
|
||||
|
||||
it("should exports RightService", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get(RightService)).toBeDefined();
|
||||
});
|
||||
|
||||
it("should exports GroupService", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get(GroupService)).toBeDefined();
|
||||
});
|
||||
|
||||
it("should exports AccountService", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get(AccountService)).toBeDefined();
|
||||
});
|
||||
|
||||
it("should exports LoginService", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get(LoginService)).toBeDefined();
|
||||
});
|
||||
|
||||
it("should exports RegistrationService", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get(RegistrationService)).toBeDefined();
|
||||
});
|
||||
|
||||
it("should exports AccountFactoryService", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get(AccountFactoryService)).toBeDefined();
|
||||
});
|
||||
|
||||
it("should provide @apihub24/mail_verification_service implementation", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get("@apihub24/mail_verification_service")).toBeDefined();
|
||||
});
|
||||
|
||||
it("should provide @apihub24/token_service implementation", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get("@apihub24/token_service")).toBeDefined();
|
||||
});
|
||||
|
||||
it("should provide @apihub24/session_service implementation", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get("@apihub24/session_service")).toBeDefined();
|
||||
});
|
||||
|
||||
it("should provide @apihub24/password_service implementation", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get("@apihub24/password_service")).toBeDefined();
|
||||
});
|
||||
|
||||
it("should provide @apihub24/account_repository implementation", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get("@apihub24/account_repository")).toBeDefined();
|
||||
});
|
||||
|
||||
it("should provide @apihub24/group_repository implementation", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get("@apihub24/group_repository")).toBeDefined();
|
||||
});
|
||||
|
||||
it("should provide @apihub24/right_repository implementation", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get("@apihub24/right_repository")).toBeDefined();
|
||||
});
|
||||
|
||||
it("should provide @apihub24/organization_repository implementation", () => {
|
||||
expect(module).toBeDefined();
|
||||
expect(module?.get("@apihub24/organization_repository")).toBeDefined();
|
||||
});
|
||||
});
|
||||
|
||||
@ -9,7 +9,7 @@ export class PasswordServiceMockModule {
|
||||
{ provide: "@apihub24/password_service", useClass: PasswordServiceMock },
|
||||
];
|
||||
return {
|
||||
module: PasswordServiceMock,
|
||||
module: PasswordServiceMockModule,
|
||||
providers: [...providers],
|
||||
exports: [...providers],
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user