Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(184)

Side by Side Diff: test/test_browser_search_view.js

Issue 13273047: Rename BrowserCharm model to just Charm
Patch Set: Rename BrowserCharm model to just Charm Created 11 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/test_browser_charm_details.js ('k') | test/test_charm_configuration.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 This file is part of the Juju GUI, which lets users view and manage Juju 2 This file is part of the Juju GUI, which lets users view and manage Juju
3 environments within a graphical interface (https://launchpad.net/juju-gui). 3 environments within a graphical interface (https://launchpad.net/juju-gui).
4 Copyright (C) 2012-2013 Canonical Ltd. 4 Copyright (C) 2012-2013 Canonical Ltd.
5 5
6 This program is free software: you can redistribute it and/or modify it under 6 This program is free software: you can redistribute it and/or modify it under
7 the terms of the GNU Affero General Public License version 3, as published by 7 the terms of the GNU Affero General Public License version 3, as published by
8 the Free Software Foundation. 8 the Free Software Foundation.
9 9
10 This program is distributed in the hope that it will be useful, but WITHOUT 10 This program is distributed in the hope that it will be useful, but WITHOUT
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 it('tells listeners the cache has updated', function() { 280 it('tells listeners the cache has updated', function() {
281 view.on(view.EV_CACHE_UPDATED, function(ev) { 281 view.on(view.EV_CACHE_UPDATED, function(ev) {
282 assert.isObject(ev.cache); 282 assert.isObject(ev.cache);
283 }); 283 });
284 view.render(); 284 view.render();
285 }); 285 });
286 286
287 it('uses passed in cache data if available', function() { 287 it('uses passed in cache data if available', function() {
288 var search_called = false, 288 var search_called = false,
289 results = { 289 results = {
290 recommended: new Y.juju.models.BrowserCharmList(), 290 recommended: new Y.juju.models.CharmList(),
291 more: new Y.juju.models.BrowserCharmList() 291 more: new Y.juju.models.CharmList()
292 }; 292 };
293 293
294 view.get('store').search = function() { 294 view.get('store').search = function() {
295 search_called = true; 295 search_called = true;
296 return results; 296 return results;
297 }; 297 };
298 view.render(results); 298 view.render(results);
299 assert.isFalse(search_called); 299 assert.isFalse(search_called);
300 300
301 view.render(); 301 view.render();
302 assert.isTrue(search_called); 302 assert.isTrue(search_called);
303 }); 303 });
304 }); 304 });
OLDNEW
« no previous file with comments | « test/test_browser_charm_details.js ('k') | test/test_charm_configuration.js » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b