it("should only accept Jive uris", function () { var builder = new ContentBuilder(); builder.parent("/contents/1"); builder.parent("/places/1"); builder.parent("/people/1"); var invalid_uris = ["a", "/a", "/a/1", "/places/ with whitespace" ]; invalid_uris.forEach(function (uri) { expect(function () { builder.parent(uri); }).to.throw(builder.INVALID_PARENT); }); });
expect(function () { builder.parent(uri); }).to.throw(builder.INVALID_PARENT);