it("should allow to set folderUriProperly", function(){ var inst = new ResourcesSearch({server: "http://localhost:8080/jasperserver-pro"}); expect(inst.validate()).toBeFalsy(); inst.folderUri("sd,[sdm"); expect(inst.validate()).toBeTruthy(); inst.folderUri("/public"); expect(inst.validate()).toBeFalsy(); });
it("should set simple values and properites together", function() { var inst = new ResourcesSearch(); inst.properties({q:"q"}); inst.folderUri("folderUri"); expect(inst.properties().q).toEqual("q"); expect(inst.properties().folderUri).toEqual("folderUri"); });