Commit 45e2da2 1 parent 0083369 commit 45e2da2 Copy full SHA for 45e2da2
File tree 2 files changed +21
-7
lines changed
2 files changed +21
-7
lines changed Original file line number Diff line number Diff line change @@ -61,13 +61,14 @@ def load(data, key)
61
61
end
62
62
else
63
63
operation = case type
64
- when 'string' ; :to_s
65
- when 'integer' ; :to_i
66
- when 'double' ; :to_f
67
- when 'boolean' ; lambda { |dat | dat === "0" ? false : !!dat }
68
- when 'date' ; :to_date
69
- when 'datetime' ; :to_datetime
70
- when 'time' ; :to_time
64
+ when 'string' ; :to_s
65
+ when 'integer' ; :to_i
66
+ when 'double' ; :to_f
67
+ when 'boolean' ; lambda { |dat | dat === "0" ? false : !!dat }
68
+ when 'date' ; :to_date
69
+ when 'datetime' ; :to_datetime
70
+ when 'time' ; :to_time
71
+ when 'base64Binary' ; lambda { |dat | Base64 . decode64 ( dat ) }
71
72
else raise RuntimeError , "Invalid WashOut simple type: #{ type } "
72
73
end
73
74
Original file line number Diff line number Diff line change @@ -451,6 +451,19 @@ def date
451
451
savon ( :date , :value => '2000-12-30' )
452
452
lambda { savon ( :date ) } . should_not raise_exception
453
453
end
454
+
455
+ it "recognize base64Binary" do
456
+ mock_controller do
457
+ soap_action "base64" , :args => :base64Binary , :return => :nil
458
+ def base64
459
+ params [ :value ] . should == 'test' unless params [ :value ] . blank?
460
+ render :soap => nil
461
+ end
462
+ end
463
+
464
+ savon ( :base64 , :value => Base64 . encode64 ( 'test' ) )
465
+ lambda { savon ( :base64 ) } . should_not raise_exception
466
+ end
454
467
end
455
468
456
469
context "errors" do
You can’t perform that action at this time.
0 commit comments