spec/support/shared_examples/signature/shared/field_methods.rb in groupdocs-1.6.0 vs spec/support/shared_examples/signature/shared/field_methods.rb in groupdocs-1.7.0

- old
+ new

@@ -79,27 +79,28 @@ end describe '#modify_field!' do let(:field) { GroupDocs::Signature::Field.new } let(:document) { GroupDocs::Document.new(:file => GroupDocs::Storage::File.new) } + let(:recipient) { GroupDocs::Signature::Recipient.new } before(:each) do mock_api_server(load_json('signature_field_add')) end it 'accepts access credentials hash' do lambda do - subject.modify_field!(field, document, :client_id => 'client_id', :private_key => 'private_key') + subject.modify_field!(field, document, recipient, :client_id => 'client_id', :private_key => 'private_key') end.should_not raise_error(ArgumentError) end it 'raises error if field is not GroupDocs::Signature::Field object' do - lambda { subject.modify_field!('Field', document) }.should raise_error(ArgumentError) + lambda { subject.modify_field!('Field', document, recipient) }.should raise_error(ArgumentError) end it 'raises error if document is not GroupDocs::Document object' do - lambda { subject.modify_field!(field, 'Document') }.should raise_error(ArgumentError) + lambda { subject.modify_field!(field, 'Document', recipient) }.should raise_error(ArgumentError) end it 'uses field and first field location as payload' do payload = {} location = {} @@ -107,10 +108,10 @@ field.should_receive(:to_hash).and_return(payload) payload.should_receive(:delete).with(:locations).and_return(payload) field.should_receive(:locations).and_return(locations) locations.should_receive(:first).and_return(location) payload.should_receive(:merge!).with(location).and_return(payload) - subject.modify_field!(field, document) + subject.modify_field!(field, document, recipient) end end describe '#assign_field!' do case described_class.name