spec/utils_spec.rb in cloudinary-1.6.0 vs spec/utils_spec.rb in cloudinary-1.7.0

- old
+ new

@@ -142,19 +142,26 @@ expect(["test", { :url_suffix => "hello", :private_cdn => true, :resource_type => :video }]) .to produce_url("http://#{cloud_name}-res.cloudinary.com/videos/test/hello") .and empty_options end - it "should support url_suffix for private uploads" do + it "should support url_suffix for private images" do expect(["test", { :url_suffix => "hello", :private_cdn => true, :resource_type => :image, :type => :private }]) .to produce_url("http://#{cloud_name}-res.cloudinary.com/private_images/test/hello") .and empty_options expect(["test", { :url_suffix => "hello", :private_cdn => true, :format => "jpg", :resource_type => :image, :type => :private }]) .to produce_url("http://#{cloud_name}-res.cloudinary.com/private_images/test/hello.jpg") .and empty_options end + it "should support url_suffix for authenticated images" do + expect(["test", { :url_suffix => "hello", :format => "jpg", :resource_type => :image, :type => :authenticated }]) + .to produce_url("http://res.cloudinary.com/#{cloud_name}/authenticated_images/test/hello.jpg") + .and empty_options + end + + describe 'root_path support' do it "should allow use_root_path in shared distribution" do # expect{Cloudinary::Utils.cloudinary_url("test", {:use_root_path=>true})}.to raise_error(CloudinaryException) expect(["test", { :use_root_path => true, :private_cdn => false }]) @@ -384,11 +391,11 @@ .to produce_url("#{upload_path}/e_sepia/test") .and empty_options end it "should support effect with hash param" do - expect(["test", { :effect => { "sepia" => 10 } }]) - .to produce_url("#{upload_path}/e_sepia:10/test") + expect(["test", { :effect => { "sepia" => -10 } }]) + .to produce_url("#{upload_path}/e_sepia:-10/test") .and empty_options end it "should support effect with array param" do expect(["test", { :effect => ["sepia", 10] }])