[Pkg-javascript-commits] [backbone] 38/211: Revising controller test as per dvv's suggestion.

Jonas Smedegaard js at moszumanska.debian.org
Sat May 3 16:59:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

js pushed a commit to tag 0.5.0
in repository backbone.

commit c0c8cb27637b7084978221a23697b069a94cd9c1
Author: Jeremy Ashkenas <jashkenas at gmail.com>
Date:   Mon Dec 20 12:34:52 2010 -0500

    Revising controller test as per dvv's suggestion.
---
 test/controller.js | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/test/controller.js b/test/controller.js
index 144e1ec..7f43fb6 100644
--- a/test/controller.js
+++ b/test/controller.js
@@ -9,7 +9,7 @@ $(document).ready(function() {
       "search/:query/p:page":       "search",
       "splat/*args/end":            "splat",
       "*first/complex-:part/*rest": "complex",
-      "query?*args":                "query"
+      ":entity?*args":              "query"
     },
 
     initialize : function(options) {
@@ -31,7 +31,8 @@ $(document).ready(function() {
       this.rest = rest;
     },
 
-    query : function(args) {
+    query : function(entity, args) {
+      this.entity    = entity;
       this.queryArgs = args;
     }
 
@@ -82,9 +83,10 @@ $(document).ready(function() {
     }, 10);
   });
 
-  asyncTest("Controller: routes (query)", function() {
-    window.location.hash = 'query?a=b&c=d';
+  asyncTest("Controller: routes (query)", 2, function() {
+    window.location.hash = 'mandel?a=b&c=d';
     setTimeout(function() {
+      equals(controller.entity, 'mandel');
       equals(controller.queryArgs, 'a=b&c=d');
       start();
       window.location.hash = '';

-- 
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