Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

Commit

Permalink
fix(test): post test
Browse files Browse the repository at this point in the history
  • Loading branch information
Rosostolato committed Aug 10, 2018
1 parent 53ed63d commit 86ff926
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/restRoute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ export class RestRoute {
}
}

// fix baseurl
let baseurl = this.getBaseUrl();
if (baseurl.charAt(baseurl.length - 1) === '/') {
baseurl = baseurl.slice(0, -1);
Expand Down
7 changes: 3 additions & 4 deletions test/restRoute.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,15 @@ describe('RestRoute', () => {

it('should post', async(() => {
const toPost = {
userId: 1,
body: "quia et suscipit↵suscipit recusandae consequuntur expedita et cum↵reprehenderit molestiae ut ut quas totam↵nostrum rerum est autem sunt rem eveniet architecto",
id: 1,
title: "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
userId: 1
title: "sunt aut facere repellat provident occaecati excepturi optio reprehenderit"
};

route.post<Post>(toPost)
.subscribe(data => {
expect(data).not.to.be.equal(null);
expect(data.id).not.to.be.equal(null);
expect(data.id).to.be.equal(1);
});
}));

Expand Down

0 comments on commit 86ff926

Please sign in to comment.