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'); |
+ }); |
+ |
}); |
})(); |