Skip to content

Commit 7501af7

Browse files
nitzanjAmir Tocker
authored andcommitted
Add test for generate_archive of raw resources.
1 parent 1d1e571 commit 7501af7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ public static void setUpClass() throws IOException {
3636
}
3737

3838
cloudinary.uploader().upload(SRC_TEST_IMAGE, asMap("tags", new String [] {SDK_TEST_TAG, ARCHIVE_TAG}));
39+
cloudinary.uploader().upload(SRC_TEST_IMAGE, asMap("tags", new String [] {SDK_TEST_TAG, ARCHIVE_TAG}, "resource_type", "raw"));
3940
cloudinary.uploader().upload(SRC_TEST_IMAGE,
4041
asMap("tags", new String [] {SDK_TEST_TAG, ARCHIVE_TAG},
4142
"transformation", new Transformation().crop("scale").width(10)));
@@ -499,6 +500,12 @@ public void testCreateArchive() throws Exception {
499500
assertEquals(4, result.get("file_count"));
500501
}
501502

503+
@Test
504+
public void testCreateArchiveRaw() throws Exception {
505+
Map result = cloudinary.uploader().createArchive(new ArchiveParams().tags(new String[]{ARCHIVE_TAG}).resourceType("raw"));
506+
assertEquals(1, result.get("file_count"));
507+
}
508+
502509
@Test
503510
public void testDownloadArchive() throws Exception {
504511
String result = cloudinary.downloadArchive(new ArchiveParams().tags(new String[]{ARCHIVE_TAG}));

0 commit comments

Comments
 (0)