Skip to content

Commit 4d3dda7

Browse files
authored
Verify testDeleteByToken takes all original config into account (#116)
1 parent 2c4a235 commit 4d3dda7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

cloudinary-test-common/src/main/java/com/cloudinary/test/AbstractUploaderTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ public void testDeleteByToken() throws Exception {
8888
Map options = ObjectUtils.asMap("return_delete_token", true, "tags", new String[]{SDK_TEST_TAG, UPLOADER_TAG});
8989
Map res = cloudinary.uploader().upload(SRC_TEST_IMAGE, options);
9090
String token = (String) res.get("delete_token");
91-
res = new Cloudinary(ObjectUtils.asMap("cloud_name", cloudinary.config.cloudName)).uploader().deleteByToken(token);
91+
Map<String, Object> baseConfig = cloudinary.config.asMap();
92+
baseConfig.remove("api_key");
93+
baseConfig.remove("api_secret");
94+
res = new Cloudinary(baseConfig).uploader().deleteByToken(token);
9295
assertNotNull(res);
9396
assertEquals("ok", res.get("result"));
9497
}

0 commit comments

Comments
 (0)