Deryck Hodge has proposed merging 
lp:~deryck/launchpad/testfix-buglisting-js-test into lp:launchpad.

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~deryck/launchpad/testfix-buglisting-js-test/+merge/81073

As part of the new CustomBugListings feature, I hide a bit of js behind a 
feature flag and removed some empty returns from 
lib/lp/bugs/javascript/buglisting.js that were no longer needed.  One test 
began to fail needing target and bugtask info now that the module didn't return 
early.  This fixes the test to setup these objects correctly now.
-- 
https://code.launchpad.net/~deryck/launchpad/testfix-buglisting-js-test/+merge/81073
Your team Launchpad code reviewers is requested to review the proposed merge of 
lp:~deryck/launchpad/testfix-buglisting-js-test into lp:launchpad.
=== modified file 'lib/lp/bugs/javascript/tests/test_buglisting.js'
--- lib/lp/bugs/javascript/tests/test_buglisting.js	2011-11-02 18:36:53 +0000
+++ lib/lp/bugs/javascript/tests/test_buglisting.js	2011-11-02 20:23:25 +0000
@@ -225,8 +225,9 @@
         };
         var template = "<ol>" +
             "{{#item}}<li>{{name}}</li>{{/item}}</ol>";
-        var navigator = new module.ListingNavigator(window.location, lp_cache,
-                                                    template);
+        var target = Y.Node.create('<div id="client-listing"></div>');
+        var navigator = new module.ListingNavigator(
+            window.location, lp_cache, template, target);
         var key = module.ListingNavigator.get_batch_key({
             order_by: "intensity",
             memo: 'memo1',
@@ -238,10 +239,13 @@
             memo: 'memo1',
             forwards: true,
             start: 5,
-            mustache_model: {item: [
-                {name: 'first'},
-                {name: 'second'}
-            ]}};
+            mustache_model: {
+                item: [
+                    {name: 'first'},
+                    {name: 'second'}
+                ],
+                bugtasks: ['a', 'b', 'c']
+            }};
         navigator.update_from_model(batch);
         Y.lp.testing.assert.assert_equal_structure(
             batch, navigator.batches[key]);

_______________________________________________
Mailing list: https://launchpad.net/~launchpad-reviewers
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~launchpad-reviewers
More help   : https://help.launchpad.net/ListHelp

Reply via email to