Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -522,14 +522,18 @@ public void testManualModeration() throws Exception {

@Test
public void testOcrUpdate() {
Exception expected = null;
// should support requesting ocr info
try {
Map uploadResult = cloudinary.uploader().upload(SRC_TEST_IMAGE, ObjectUtils.asMap("tags", UPLOAD_TAGS));
api.update((String) uploadResult.get("public_id"), ObjectUtils.asMap("ocr", "illegal"));
} catch (Exception e) {
assertTrue(e instanceof BadRequest);
assertTrue(e.getMessage().matches("^Illegal value(.*)"));
expected = e;
}

assertNotNull(expected);
assertTrue(expected instanceof BadRequest);
assertTrue(expected.getMessage().matches("^Illegal value(.*)"));
}

@Test
Expand Down