Skip to content
This repository has been archived by the owner on Oct 29, 2019. It is now read-only.

Commit

Permalink
Merge pull request #404 from vxsx/feature/fix-unit-tests-from-forks
Browse files Browse the repository at this point in the history
fix unit tests to not make actual requests
  • Loading branch information
vxsx committed May 26, 2016
2 parents 2070a68 + 0320ece commit 650f755
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions aldryn_newsblog/tests/frontend/unit/test.cl.newsblog.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@ describe('cl.newsblog.js:', function () {
});

it('has correct url parameter in ajax request', function () {
spyOn($, 'ajax').and.callThrough();
spyOn($, 'ajax').and.returnValue({
always: function () {
return { fail: function () {} };
}
});

Cl.newsBlog._handler.call(
$('.js-aldryn-newsblog-article-search .form-inline')[0],
this.preventEvent);
Expand All @@ -67,7 +72,11 @@ describe('cl.newsblog.js:', function () {
});

it('has correct data parameter in ajax request', function () {
spyOn($, 'ajax').and.callThrough();
spyOn($, 'ajax').and.returnValue({
always: function () {
return { fail: function () {} };
}
});
Cl.newsBlog._handler.call(
$('.js-aldryn-newsblog-article-search .form-inline')[0],
this.preventEvent);
Expand Down

0 comments on commit 650f755

Please sign in to comment.