[Pkg-javascript-commits] [backbone] 03/23: split out test for positive and negative ids
Jonas Smedegaard
js at moszumanska.debian.org
Sat May 3 17:00:43 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 8971361bdc14ef968816c53b341cedda074bc333
Author: Matt Smith <matthewgarysmith at gmail.com>
Date: Thu Mar 3 17:33:19 2011 -0500
split out test for positive and negative ids
---
test/model.js | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/test/model.js b/test/model.js
index adce36b..b7eeea7 100644
--- a/test/model.js
+++ b/test/model.js
@@ -94,8 +94,10 @@ $(document).ready(function() {
test("Model: isNew", function() {
a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3});
ok(a.isNew(), "it should be new");
+ a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3, 'id': 2 });
+ ok(!a.isNew(), "any defined ID is legal, positive integer");
a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3, 'id': -5 });
- ok(!a.isNew(), "any defined ID is legal, negative or positive");
+ ok(!a.isNew(), "any defined ID is legal, 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