spec/groupdocs/document/annotation_spec.rb in groupdocs-1.5.5 vs spec/groupdocs/document/annotation_spec.rb in groupdocs-1.5.6
- old
+ new
@@ -142,22 +142,18 @@
mock_api_server(load_json('annotation_create'))
end
it 'accepts access credentials hash' do
lambda do
- subject.create!(:client_id => 'client_id', :private_key => 'private_key')
+ subject.create!('info', :client_id => 'client_id', :private_key => 'private_key')
end.should_not raise_error(ArgumentError)
end
- it 'uses hashed version of self as request body' do
- subject.should_receive(:to_hash).and_return({})
- subject.create!
- end
it 'updated self with response values' do
lambda do
- subject.create!
+ subject.create!('info')
end.should change {
subject.id
subject.guid
subject.document_guid
subject.reply_guid
@@ -223,9 +219,45 @@
it 'creates box coordinates if it is not set' do
subject.move_marker! 10, 10
subject.box.x.should == 10
subject.box.y.should == 10
+ end
+ end
+
+ describe '#resize!' do
+ before(:each) do
+ mock_api_server('{ "status": "Ok", "result": {}}')
+ end
+
+ it 'accepts access credentials hash' do
+ lambda do
+ subject.resize!(10, 10, :client_id => 'client_id', :private_key => 'private_key')
+ end.should_not raise_error(ArgumentError)
+ end
+ end
+
+ describe '#text_info!' do
+ before(:each) do
+ mock_api_server('{ "status": "Ok", "result": {}}')
+ end
+
+ it 'accepts access credentials hash' do
+ lambda do
+ subject.text_info!(fieldText, fontFamily, fontSize, :client_id => 'client_id', :private_key => 'private_key')
+ end.should_not raise_error(ArgumentError)
+ end
+ end
+
+ describe '#text_color!' do
+ before(:each) do
+ mock_api_server('{ "status": "Ok", "result": {}}')
+ end
+
+ it 'accepts access credentials hash' do
+ lambda do
+ subject.text_color!(font_color :client_id => 'client_id', :private_key => 'private_key')
+ end.should_not raise_error(ArgumentError)
end
end
describe '#set_access!' do
before(:each) do