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

Unified Diff: test/test_browser_search_view.js

Issue 9841044: Update the Charmworld store to use Api1 vs Api0
Patch Set: Update the Charmworld store to use Api1 vs Api0 Created 11 years, 10 months ago
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/test_browser_editorial.js ('k') | test/test_charm_store.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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', {
« no previous file with comments | « test/test_browser_editorial.js ('k') | test/test_charm_store.js » ('j') | no next file with comments »

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