Skip to content

Commit

Permalink
Adding test for article service, should not make HTTP request if arti…
Browse files Browse the repository at this point in the history
…cle is saved with no changes.
  • Loading branch information
Jeremy Sik committed Sep 18, 2015
1 parent 03863f1 commit 631957b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/src/common/services/article/articleService.spec.ts
Expand Up @@ -209,6 +209,17 @@

});

it('should not make an api call if nothing has changed', () => {

let article = fixtures.getArticle();
article.setExists(true);

let savePromise = articleService.saveArticleWithRelated(article);

expect(savePromise).eventually.to.equal(article);

});

});

});
Expand Down

0 comments on commit 631957b

Please sign in to comment.