Skip to content

Commit 0aacbcc

Browse files
committed
Update test for change moderation status
1 parent 9344373 commit 0aacbcc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/api_spec.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,10 +728,13 @@ describe("api", function () {
728728
xhr.restore();
729729
});
730730
it("should support changing moderation status with notification-url", function () {
731-
return cloudinary.v2.api.update("sample", {
731+
this.timeout(helper.TIMEOUT_LONG);
732+
return cloudinary.v2.uploader.upload(IMAGE_FILE, {
733+
moderation: "manual",
734+
}).then(upload_result => cloudinary.v2.api.update(upload_result.public_id, {
732735
moderation_status: "approved",
733736
notification_url: "http://example.com",
734-
}).then(function () {
737+
})).then(function () {
735738
if (writeSpy.called) {
736739
sinon.assert.calledWith(writeSpy, sinon.match(/notification_url=http%3A%2F%2Fexample.com/));
737740
sinon.assert.calledWith(writeSpy, sinon.match(/moderation_status=approved/));

0 commit comments

Comments
 (0)