Permalink
Browse files

added support for Backbone 1.0.0

  • Loading branch information...
1 parent 0f31a2f commit 538a44d38e3bfca72782789cdd99514c19f80485 @jdkanani jdkanani committed Mar 20, 2013
Showing with 1,708 additions and 1,515 deletions.
  1. +4 −4 test/associated-model.js
  2. +139 −55 test/backbone/collection.js
  3. +1 −1 test/backbone/environment.js
  4. +47 −18 test/backbone/model.js
  5. +2 −2 test/backbone/sync.js
  6. +9 −2 test/backbone/view.js
  7. +1,506 −1,433 test/lib/backbone.js
View
@@ -780,7 +780,7 @@ $(document).ready(function () {
test("save", 1, function () {
emp = new Backbone.Model();
emp.sync = function (method, model, options) {
- options.success(this, null, options);
+ options.success.call(this, null, options);
};
emp.save(null, {
success:function () {
@@ -795,7 +795,7 @@ $(document).ready(function () {
test("validate after save", 1, function () {
var lastError = null;
emp.sync = function (method, model, options) {
- options.success(this, {sex:'O'}, options);
+ options.success.call(this, {sex:'O'}, options);
};
//Backbone 0.9.9
emp.on('invalid', function (model, error) {
@@ -863,7 +863,7 @@ $(document).ready(function () {
},
//proxy for server
sync:function (method, model, options) {
- return options.success(this, {
+ return options.success.call(this, {
name:'c-name',
employees:[
{
@@ -908,7 +908,7 @@ $(document).ready(function () {
},
//proxy for save success
sync:function (method, model, options) {
- options.success(this, null, options);
+ options.success.call(this, null, options);
}
});
Oops, something went wrong.

0 comments on commit 538a44d

Please sign in to comment.