--- Revision None +++ Revision 383633613639 @@ -0,0 +1,24 @@ +apiEasy = require "api-easy" +assert = require "assert" +xml2js = require "xml2js" + +parser = new xml2js.Parser() + +suite = apiEasy.describe "Content module" +suite.use "apps-beta.meego.com", 80 + +# Distributions +suite.discuss("Getting list of distributions") + .path("/ocs/v1/content/distributions") + .get() + .expect(200) + .expect "Should contain a list", (error, response, body) -> + parser = new xml2js.Parser() + parser.on "end", (result) -> + assert.equal result.meta.statuscode, 100 + assert.equal result.data.distribution.length, result.meta.totalitems + parser.parseString body + .undiscuss() + .unpath() + +suite.run()