[Pkg-javascript-commits] [backbone] 06/23: remove model_with helper from test
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 d3a0b646034b5fd83079fa906406d4c6c00d7f79
Author: Matt Smith <matthewgarysmith at gmail.com>
Date: Tue May 31 09:31:04 2011 -0400
remove model_with helper from test
---
test/model.js | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
diff --git a/test/model.js b/test/model.js
index 43de581..ac868a5 100644
--- a/test/model.js
+++ b/test/model.js
@@ -12,10 +12,6 @@ $(document).ready(function() {
lastRequest = _.toArray(arguments);
};
- var model_with = function(attributes){
- return new Backbone.Model(attributes);
- }
-
var attrs = {
id : '1-the-tempest',
title : "The Tempest",
@@ -96,9 +92,9 @@ $(document).ready(function() {
});
test("Model: isNew", function() {
- ok( model_with({ }).isNew(), "is true when there is no id");
- ok(!model_with({ 'id': 2 }).isNew(), "is false for a positive integer");
- ok(!model_with({ 'id': -5 }).isNew(), "is false for a negative integer");
+ 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