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

Unified Diff: test/test_charm_store.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_search_view.js ('k') | test/test_model.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/test_charm_store.js
=== modified file 'test/test_charm_store.js'
--- test/test_charm_store.js 2013-05-17 14:51:05 +0000
+++ test/test_charm_store.js 2013-05-29 15:20:20 +0000
@@ -247,7 +247,7 @@
});
});
- describe('juju charmworld0 api', function() {
+ describe('juju charmworld1 api', function() {
var Y, models, conn, env, app, container, charmStore, data, juju;
before(function(done) {
@@ -266,17 +266,17 @@
it('constructs the api url correctly based on apiHost', function() {
var hostname = 'http://localhost/',
- api = new Y.juju.Charmworld0({
+ api = new Y.juju.Charmworld1({
apiHost: hostname
}),
ds = api.get('datasource');
- ds.get('source').should.eql('http://localhost/api/0/');
+ ds.get('source').should.eql('http://localhost/api/1/');
});
it('handles loading interesting content correctly', function(done) {
var hostname = 'http://localhost',
- api = new Y.juju.Charmworld0({
+ api = new Y.juju.Charmworld1({
apiHost: hostname
}),
data = [];
@@ -303,7 +303,7 @@
var hostname = 'http://localhost',
data = [],
url;
- var api = new Y.juju.Charmworld0({
+ var api = new Y.juju.Charmworld1({
apiHost: hostname
});
data.push({
@@ -332,6 +332,18 @@
}, this);
api.destroy();
});
+
+ it('constructs filepaths correct', function() {
+ var hostname = 'http://localhost';
+ var api = new Y.juju.Charmworld1({
+ apiHost: hostname
+ });
+
+ var iconPath = api.filepath('precise/mysql-1', 'icon.svg');
+ iconPath.should.eql(
+ 'http://localhostapi/1/charm/precise/mysql-1/file/icon.svg');
+ });
+
});
})();
« no previous file with comments | « test/test_browser_search_view.js ('k') | test/test_model.js » ('j') | no next file with comments »

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