spec/groupdocs/signature/envelope_spec.rb in groupdocs-1.4.2 vs spec/groupdocs/signature/envelope_spec.rb in groupdocs-1.5.0
- old
+ new
@@ -149,14 +149,18 @@
mock_api_server(load_json('signature_field_add'))
end
it 'accepts access credentials hash' do
lambda do
- subject.fill_field!('test', field, document, recipient, :client_id => 'client_id', :private_key => 'private_key')
+ subject.fill_field!('test', field, document, recipient, {}, :client_id => 'client_id', :private_key => 'private_key')
end.should_not raise_error(ArgumentError)
end
+ it 'can be public' do
+ lambda { subject.fill_field!('test', field, document, recipient, :public => true) }.should_not raise_error(ArgumentError)
+ end
+
it 'raises error if field is not GroupDocs::Signature::Field object' do
lambda { subject.fill_field!('test', 'Field', document, recipient) }.should raise_error(ArgumentError)
end
it 'raises error if document is not GroupDocs::Document object' do
@@ -200,11 +204,15 @@
mock_api_server('{ "status": "Ok", "result": {}}')
end
it 'accepts access credentials hash' do
lambda do
- subject.sign!(recipient, :client_id => 'client_id', :private_key => 'private_key')
+ subject.sign!(recipient, {}, :client_id => 'client_id', :private_key => 'private_key')
end.should_not raise_error(ArgumentError)
+ end
+
+ it 'can be public' do
+ lambda { subject.fill_field!('test', field, document, recipient, :public => true) }.should_not raise_error(ArgumentError)
end
it 'raises error if recipient is not GroupDocs::Signature::Recipient object' do
lambda { subject.sign!('Recipient') }.should raise_error(ArgumentError)
end