Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/services.template.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ if (typeof module !== 'undefined' && typeof exports !== 'undefined' &&
<% } -%>
url: urlBase + <%- helpers.quotedString(helpers.getPropertyOfFirstEndpoint(action, 'fullPath')) %>,
method: <%- helpers.quotedString(helpers.getPropertyOfFirstEndpoint(action, 'verb')) %>,
cancellable: true,
},
<% }); // meta.methods.foreach -%>
<% if (meta.isUser) { -%>
Expand Down
13 changes: 13 additions & 0 deletions test.e2e/spec/services.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,19 @@ define(['angular', 'given', 'util'], function(angular, given, util) {
);
return list.$promise;
});

it('has a $cancelRequest property', function() {
var list = MyModel.find(
function() {

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this empty line.

var list = MyModel.find
  function() {},
  util.throwHttpError
);

},
util.throwHttpError
);

expect(list).to.have.own.property('$cancelRequest');

return list.$promise;
});

it('can create new resource', function() {
var obj = MyModel.create({ name: 'new' }, function() {
Expand Down