~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to lib/lp/bugs/javascript/tests/test_buglisting.js

  • Committer: Launchpad Patch Queue Manager
  • Date: 2011-11-02 20:35:28 UTC
  • mfrom: (14233.1.1 testfix-buglisting-js-test)
  • Revision ID: launchpad@pqm.canonical.com-20111102203528-35vm2ullcz2hzl51
[r=abentley][no-qa] Fix a broken test by correctly setting up objects
 in test_update_from_model_caches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
        };
226
226
        var template = "<ol>" +
227
227
            "{{#item}}<li>{{name}}</li>{{/item}}</ol>";
228
 
        var navigator = new module.ListingNavigator(window.location, lp_cache,
229
 
                                                    template);
 
228
        var target = Y.Node.create('<div id="client-listing"></div>');
 
229
        var navigator = new module.ListingNavigator(
 
230
            window.location, lp_cache, template, target);
230
231
        var key = module.ListingNavigator.get_batch_key({
231
232
            order_by: "intensity",
232
233
            memo: 'memo1',
238
239
            memo: 'memo1',
239
240
            forwards: true,
240
241
            start: 5,
241
 
            mustache_model: {item: [
242
 
                {name: 'first'},
243
 
                {name: 'second'}
244
 
            ]}};
 
242
            mustache_model: {
 
243
                item: [
 
244
                    {name: 'first'},
 
245
                    {name: 'second'}
 
246
                ],
 
247
                bugtasks: ['a', 'b', 'c']
 
248
            }};
245
249
        navigator.update_from_model(batch);
246
250
        Y.lp.testing.assert.assert_equal_structure(
247
251
            batch, navigator.batches[key]);