Skip to content

Commit b9b139f

Browse files
authored
Fix videotag missing authtoken
1 parent 38ff6db commit b9b139f

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

cloudinary-core/src/main/java/com/cloudinary/Url.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ public Url clone() {
7777
cloned.urlSuffix = this.urlSuffix;
7878
cloned.useRootPath = this.useRootPath;
7979
cloned.longUrlSignature = this.longUrlSignature;
80+
cloned.authToken = this.authToken;
8081
return cloned;
8182
}
8283

cloudinary-core/src/test/java/com/cloudinary/test/CloudinaryTest.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,7 +1196,20 @@ public void testVideoTagWithPoster() {
11961196
.poster(false)
11971197
.videoTag("movie", emptyMap());
11981198
assertEquals(expectedTag, actualTag);
1199+
}
11991200

1201+
@Test
1202+
public void videoTagWithAuthTokenTest() {
1203+
String actualTag = cloudinary.url().transformation(new Transformation())
1204+
.type("upload")
1205+
.authToken(new AuthToken("123456").duration(300))
1206+
.signed(true)
1207+
.secure(true)
1208+
.videoTag("sample", Cloudinary.asMap(
1209+
"controls", true,
1210+
"loop", true)
1211+
);
1212+
assert(actualTag.contains("cld_token"));
12001213
}
12011214

12021215
@Test

cloudinary-http44/src/test/java/com/cloudinary/test/UploaderTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,4 @@ public void testTimeoutParameter() throws Exception {
3030
"timeout", 1);
3131
ApiResponse result = cloudinary.api().resources(options);
3232
}
33-
34-
}
33+
}

0 commit comments

Comments
 (0)