Skip to content

Commit af74827

Browse files
fix: make tests consistent with python sdk
1 parent 7e23f76 commit af74827

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/unit/url/sign_url_spec.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -76,35 +76,33 @@ describe("URL for authenticated asset", () => {
7676
assert.strictEqual(signedUrl, 'http://res.cloudinary.com/test123/image/fetch/s--hH_YcbiS--/v1234/http://google.com/path/to/image.png');
7777
});
7878

79-
it('should have signature for authenticated asset with text overlay transformation including encoded text', () => {
79+
it.only('should have signature for authenticated asset with text overlay transformation including encoded emoji', () => {
8080
const signedUrl = cloudinary.utils.url(TEST_PUBLIC_ID, {
8181
type: 'authenticated',
8282
sign_url: true,
83-
secure: true,
8483
transformation: {
8584
color: 'red',
8685
overlay: {
87-
text: 'Cool%25F0%259F%2598%258D',
86+
text: 'Cool%F0%9F%98%8D',
8887
font_family: 'Times',
8988
font_size: 70,
9089
font_weight: 'bold'
9190
}
9291
}
9392
});
9493

95-
assert.strictEqual(signedUrl, 'https://res.cloudinary.com/test123/image/authenticated/s--Uqk1a-5W--/co_red,l_text:Times_70_bold:Cool%25F0%259F%2598%258D/image.jpg');
94+
assert.strictEqual(signedUrl, 'http://res.cloudinary.com/test123/image/authenticated/s--Uqk1a-5W--/co_red,l_text:Times_70_bold:Cool%25F0%259F%2598%258D/image.jpg');
9695
});
9796

9897
it('should have signature for raw transformation string', () => {
9998
const signedUrl = cloudinary.utils.url(TEST_PUBLIC_ID, {
10099
type: 'authenticated',
101100
sign_url: true,
102-
secure: true,
103101
transformation: {
104102
raw_transformation: 'co_red,l_text:Times_70_bold:Cool%25F0%259F%2598%258D'
105103
}
106104
});
107105

108-
assert.strictEqual(signedUrl, 'https://res.cloudinary.com/test123/image/authenticated/s--Uqk1a-5W--/co_red,l_text:Times_70_bold:Cool%25F0%259F%2598%258D/image.jpg');
106+
assert.strictEqual(signedUrl, 'http://res.cloudinary.com/test123/image/authenticated/s--Uqk1a-5W--/co_red,l_text:Times_70_bold:Cool%25F0%259F%2598%258D/image.jpg');
109107
});
110108
})

0 commit comments

Comments
 (0)