spec/utils_spec.rb in cloudinary-1.0.23 vs spec/utils_spec.rb in cloudinary-1.0.24

- old
+ new

@@ -204,13 +204,27 @@ result = Cloudinary::Utils.cloudinary_url("http://cloudinary.com/images/logo.png", options) options.should == {} result.should == "http://res.cloudinary.com/test123/image/fetch/f_jpg/http://cloudinary.com/images/logo.png" end - it "should support effects" do - options = {:effects=>"sepia"} + it "should support effect" do + options = {:effect=>"sepia"} result = Cloudinary::Utils.cloudinary_url("test", options) options.should == {} result.should == "http://res.cloudinary.com/test123/image/upload/e_sepia/test" + end + + it "should support effect with hash param" do + options = {:effect=>{"sepia"=>10}} + result = Cloudinary::Utils.cloudinary_url("test", options) + options.should == {} + result.should == "http://res.cloudinary.com/test123/image/upload/e_sepia:10/test" + end + + it "should support effect with array param" do + options = {:effect=>["sepia", 10]} + result = Cloudinary::Utils.cloudinary_url("test", options) + options.should == {} + result.should == "http://res.cloudinary.com/test123/image/upload/e_sepia:10/test" end end