[Pkg-javascript-commits] [backbone] 21/23: resolving merge conflict, removing old test.
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:00:45 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to tag 0.5.1
in repository backbone.
commit da6d0b90ca47bf57ed0841ffc0d14ada4f5f4b00
Merge: 10230e4 d3a0b64
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date: Tue Jul 5 09:42:15 2011 -0400
resolving merge conflict, removing old test.
test/model.js | 3 +++
test/router.js | 9 ---------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --cc test/model.js
index 142857c,ac868a5..3bb8ffe
--- a/test/model.js
+++ b/test/model.js
@@@ -92,15 -92,9 +92,18 @@@ $(document).ready(function()
});
test("Model: isNew", function() {
+ attrs = { 'foo': 1, 'bar': 2, 'baz': 3};
+ a = new Backbone.Model(attrs);
+ ok(a.isNew(), "it should be new");
+ attrs = { 'foo': 1, 'bar': 2, 'baz': 3, 'id': -5 };
+ a = new Backbone.Model(attrs);
+ ok(!a.isNew(), "any defined ID is legal, negative or positive");
+ attrs = { 'foo': 1, 'bar': 2, 'baz': 3, 'id': 0 };
+ a = new Backbone.Model(attrs);
+ ok(!a.isNew(), "any defined ID is legal, including zero");
+ ok( new Backbone.Model({ }).isNew(), "is true when there is no id");
+ ok(!new Backbone.Model({ 'id': 2 }).isNew(), "is false for a positive integer");
+ ok(!new Backbone.Model({ 'id': -5 }).isNew(), "is false for a negative integer");
});
test("Model: get", function() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/backbone.git
More information about the Pkg-javascript-commits
mailing list