File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -845,13 +845,6 @@ public void TestDisallowUseRootPathIfNotImageUploadForRaw()
845845 m_api . UrlImgUp . UseRootPath ( true ) . PrivateCdn ( true ) . ResourceType ( "raw" ) . BuildUrl ( "test" ) ;
846846 }
847847
848- [ Test ]
849- [ ExpectedException ( ExpectedException = typeof ( NotSupportedException ) , ExpectedMessage = "URL Suffix only supported in private CDN!" ) ]
850- public void TestDisallowUrlSuffixInSharedDistribution ( )
851- {
852- m_api . UrlImgUp . Suffix ( "hello" ) . BuildUrl ( "test" ) ;
853- }
854-
855848 [ Test ]
856849 [ ExpectedException ( ExpectedException = typeof ( NotSupportedException ) , ExpectedMessage = "URL Suffix only supported for image/upload and raw/upload!" ) ]
857850 public void TestDisallowUrlSuffixInNonUploadTypes ( )
@@ -920,6 +913,13 @@ public void TestSupportUrlSuffixForRawUploads()
920913 Assert . AreEqual ( "http://testcloud-res.cloudinary.com/files/test/hello" , actual ) ;
921914 }
922915
916+ [ Test ]
917+ public void TestSupportUrlSuffixForSharedCdn ( )
918+ {
919+ string actual = m_api . UrlImgUp . Suffix ( "hello" ) . Signed ( true ) . Format ( "jpg" ) . BuildUrl ( "test" ) ;
920+ Assert . AreEqual ( "http://res.cloudinary.com/testcloud/images/s--1TMilNWq--/test/hello.jpg" , actual ) ;
921+ }
922+
923923 [ Test ]
924924 public void TestResponsiveWidthTransform ( )
925925 {
Original file line number Diff line number Diff line change @@ -492,9 +492,6 @@ public string BuildUrl(string source)
492492 if ( String . IsNullOrEmpty ( m_cloudName ) )
493493 throw new ArgumentException ( "cloudName must be specified!" ) ;
494494
495- if ( ! m_usePrivateCdn && ! String . IsNullOrEmpty ( m_suffix ) )
496- throw new NotSupportedException ( "URL Suffix only supported in private CDN!" ) ;
497-
498495 if ( source == null )
499496 source = m_source ;
500497
You can’t perform that action at this time.
0 commit comments