mirror of
https://github.com/jashkenas/backbone.git
synced 2026-01-23 22:08:04 -05:00
split out test for positive and negative ids
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user