[Pkg-javascript-commits] [backbone] 02/23: use hash literal directly
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 5ebd949c7f2f38f3a4d519512a72975aa73101b8
Author: Matt Smith <matthewgarysmith at gmail.com>
Date: Thu Mar 3 17:20:38 2011 -0500
use hash literal directly
This will make it harder to forget to instantiate the model.
---
test/model.js | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/test/model.js b/test/model.js
index 6598e0e..adce36b 100644
--- a/test/model.js
+++ b/test/model.js
@@ -92,11 +92,9 @@ $(document).ready(function() {
});
test("Model: isNew", function() {
- attrs = { 'foo': 1, 'bar': 2, 'baz': 3};
- a = new Backbone.Model(attrs);
+ a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3});
ok(a.isNew(), "it should be new");
- attrs = { 'foo': 1, 'bar': 2, 'baz': 3, 'id': -5 };
- a = new Backbone.Model(attrs);
+ a = new Backbone.Model({ 'foo': 1, 'bar': 2, 'baz': 3, 'id': -5 });
ok(!a.isNew(), "any defined ID is legal, negative or positive");
});
--
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