File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
cloudinary-core/src/test/java/com/cloudinary Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -116,4 +116,14 @@ public void testUrlInTag() {
116116 assertThat (url , Matchers .matchesPattern ("<img.*src='http://res.cloudinary.com/test123/image/authenticated/v1486020273/sample.jpg\\ ?__cld_token__=st=11111111~exp=11111411~hmac=9bd6f41e2a5893da8343dc8eb648de8bf73771993a6d1457d49851250caf3b80.*>" ));
117117
118118 }
119- }
119+
120+ @ Test
121+ public void testIgnoreUrlIfAclIsProvided () {
122+ String user = "foobar" ; // username taken from elsewhere
123+ AuthToken token = new AuthToken (KEY ).duration (300 ).acl ("/*/t_" + user ).startTime (222222222 );
124+ String cookieToken = token .generate ();
125+ AuthToken aclToken = new AuthToken (KEY ).duration (300 ).acl ("/*/t_" + user ).startTime (222222222 );
126+ String cookieAclToken = aclToken .generate ("http://res.cloudinary.com/test123/image/upload/v1486020273/sample.jpg" );
127+ assertEquals (cookieToken , cookieAclToken );
128+ }
129+ }
You can’t perform that action at this time.
0 commit comments