Index: test/test_browser_search_view.js |
=== modified file 'test/test_browser_search_view.js' |
--- test/test_browser_search_view.js 2013-05-28 23:04:16 +0000 |
+++ test/test_browser_search_view.js 2013-05-29 18:00:54 +0000 |
@@ -35,10 +35,21 @@ |
'node-event-simulate', |
'subapp-browser-searchview', |
function(Y) { |
+ // Need the handlebars helper for the charm-token to render. |
+ Y.Handlebars.registerHelper( |
+ 'charmFilePath', |
+ function(charmID, file) { |
+ return '/path/to/charm/' + file; |
+ }); |
done(); |
}); |
}); |
+ after(function(done) { |
+ Y.Handlebars.helpers.charmFilePath = undefined; |
+ done(); |
+ }); |
+ |
beforeEach(function() { |
// Mock out a dummy location for the Store used in view instances. |
window.juju_config = {charmworldURL: 'http://localhost'}; |
@@ -49,12 +60,15 @@ |
// |
// Create monkeypatched store to verify right method is called. |
apiURL = ''; |
- var fakeStore = new Y.juju.Charmworld0({}); |
+ var fakeStore = new Y.juju.Charmworld1({}); |
var sampleData = { |
result: [{ |
- id: 'foo/bar-2', |
- name: 'bar', |
- description: 'some charm named bar' |
+ charm: { |
+ id: 'foo/bar-2', |
+ name: 'bar', |
+ description: 'some charm named bar', |
+ files: [] |
+ } |
}] |
}; |
fakeStore.set('datasource', { |