Skip to content

Commit 07a483f

Browse files
test: requesting tags and context in rename response
1 parent e6f7341 commit 07a483f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/integration/api/uploader/uploader_spec.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@ describe("uploader", function () {
191191
expect(format).to.eql("png");
192192
});
193193
});
194+
it('should include tags in rename response if requested explicitly', async () => {
195+
const uploadResult = await cloudinary.v2.uploader.upload(IMAGE_FILE, { context: 'alt=Example|class=Example', tags: ['test-tag'] });
196+
197+
const renameResult = await cloudinary.v2.uploader.rename(uploadResult.public_id, `${uploadResult.public_id}-renamed`, {tags: true, context: true});
198+
199+
expect(renameResult).to.have.property('tags');
200+
expect(renameResult).to.have.property('context');
201+
});
194202
return context(":invalidate", function () {
195203
var spy, xhr;
196204
spy = void 0;

0 commit comments

Comments
 (0)