Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
#10 #14 main spec file with the integration of routers
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeldacap committed Aug 29, 2016
1 parent 756357a commit 483c45f
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions oasp4js-sample/src/app/oasp4js-sample.component.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ import {
inject
} from '@angular/core/testing';
import { Oasp4jsSampleAppComponent } from '../app/oasp4js-sample.component';
import {ROUTER_DIRECTIVES, Router, Routes} from "@angular/router";

beforeEachProviders(() => [Oasp4jsSampleAppComponent]);
describe('[COMPONENT]: Oasp4jsSampleAppComponent', () => {
let component: Oasp4jsSampleAppComponent;
let router: Router;
beforeAll(() => {
router = jasmine.createSpyObj("Router", ['navigate']);
component = new Oasp4jsSampleAppComponent(router);
});
it("should be defined", () => {
expect(component).toBeDefined();
});

describe('App: Oasp4jsSample', () => {
it('should create the app',
inject([Oasp4jsSampleAppComponent], (app: Oasp4jsSampleAppComponent) => {
expect(app).toBeTruthy();
}));

it('should have as title \'oasp4js-sample works!\'',
inject([Oasp4jsSampleAppComponent], (app: Oasp4jsSampleAppComponent) => {
expect(app.title).toEqual('oasp4js-sample works!');
}));
it('should have as title \'oasp4js-sample works!\'', () => {
expect(component.title).toEqual('oasp4js-sample works!');
});
});

0 comments on commit 483c45f

Please sign in to comment.