Skip to content

Commit

Permalink
Use original URI after destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
jcrosby committed May 12, 2010
1 parent 4021cb7 commit 5d7d3ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,13 @@ test('destroy', function() {
success: function() {
store.collection('things').create({name:"box", color:"red"}, {
success: function(resource) {
var original_uri = resource.uri();
resource.destroy({
success: function() {
ok(0 == store.collection('things').all().length, "The destroy method should remove the object");
var result = $.ajax({
type: 'GET',
url: resource.uri(),
url: original_uri,
async: false
});
ok(410 == result.status, "The destroy method should remove the remote resource");
Expand Down

0 comments on commit 5d7d3ee

Please sign in to comment.