mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-19 20:08:31 -05:00
Tweak tests a bit.
This commit is contained in:
@@ -833,14 +833,8 @@ $(document).ready(function() {
|
||||
|
||||
test('#1412 - Trigger "sync" event for fetch also', 1, function() {
|
||||
var model = new Backbone.Model;
|
||||
model.sync = function(method, model, options) {
|
||||
options.success();
|
||||
};
|
||||
var syncTriggered = false;
|
||||
model.on('sync', function() {
|
||||
syncTriggered = true;
|
||||
});
|
||||
model.sync = function(method, model, options) { options.success(); };
|
||||
model.on('sync', function() { ok(true); });
|
||||
model.fetch();
|
||||
ok(syncTriggered);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user