spec/utils_spec.rb in cloudinary-1.10.1.pre.rc vs spec/utils_spec.rb in cloudinary-1.11.0

- old
+ new

@@ -456,10 +456,16 @@ expect(["test", { :effect => ["blur_region", 5000], :gravity => "ocr_text" }]) .to produce_url("#{upload_path}/e_blur_region:5000,g_ocr_text/test") .and empty_options end + it "should support artistic effect" do + expect(["test", { :effect => "art:incognito"}]) + .to produce_url("#{upload_path}/e_art:incognito/test") + .and empty_options + end + it "should support keyframe_interval" do expect(["test", { :keyframe_interval => 10 }]) .to produce_url("#{upload_path}/ki_10/test") .and empty_options end @@ -943,7 +949,22 @@ it 'should base64 encoded URL for a remote function' do actual = Cloudinary::Utils.generate_transformation_string :custom_function => custom_function_remote expect( actual).to eq("fn_#{custom_function_remote_str}") end + + it 'should accept a string value' do + actual = Cloudinary::Utils.generate_transformation_string :custom_pre_function => custom_function_wasm_str + expect( actual).to eq("fn_pre:#{custom_function_wasm_str}") + end + it 'should accept a hash of options' do + actual = Cloudinary::Utils.generate_transformation_string :custom_pre_function => custom_function_wasm + expect( actual).to eq("fn_pre:#{custom_function_wasm_str}") + end + it 'should base64 encoded URL for a remote function' do + actual = Cloudinary::Utils.generate_transformation_string :custom_pre_function => custom_function_remote + expect( actual).to eq("fn_pre:#{custom_function_remote_str}") + + end + end end