groupdocs 1.9.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.md +13 -0
- data/README.md +1 -1
- data/examples/api-samples/Gemfile +1 -1
- data/examples/api-samples/Gemfile.lock +29 -23
- data/examples/api-samples/public/css/style.css +10 -2
- data/examples/api-samples/public/docs/sample11.html +11 -7
- data/examples/api-samples/samples/sample11.rb +4 -6
- data/examples/api-samples/views/_others_samples.haml +231 -91
- data/examples/api-samples/views/index.haml +230 -92
- data/examples/api-samples/views/sample07.haml +1 -1
- data/examples/api-samples/web.rb +1 -0
- data/groupdocs.gemspec +2 -2
- data/lib/groupdocs/api.rb +1 -0
- data/lib/groupdocs/document.rb +12 -0
- data/lib/groupdocs/document/annotation.rb +5 -0
- data/lib/groupdocs/document/annotation/marker.rb +1 -1
- data/lib/groupdocs/document/editor.rb +13 -1
- data/lib/groupdocs/document/metadata.rb +6 -0
- data/lib/groupdocs/document/option.rb +9 -0
- data/lib/groupdocs/signature/form.rb +4 -6
- data/lib/groupdocs/storage/file.rb +1 -2
- data/lib/groupdocs/version.rb +1 -1
- data/spec/groupdocs/api/helpers/access_rights_helper_spec.rb +3 -3
- data/spec/groupdocs/api/helpers/byte_flag_helper_spec.rb +2 -2
- data/spec/groupdocs/datasource_spec.rb +5 -46
- data/spec/groupdocs/document/annotation/reply_spec.rb +5 -5
- data/spec/groupdocs/document/annotation/reviewer_spec.rb +2 -2
- data/spec/groupdocs/document/annotation_spec.rb +11 -43
- data/spec/groupdocs/document_spec.rb +61 -298
- data/spec/groupdocs/job_spec.rb +20 -74
- data/spec/groupdocs/questionnaire/collector_spec.rb +8 -8
- data/spec/groupdocs/questionnaire/execution_spec.rb +6 -6
- data/spec/groupdocs/questionnaire_spec.rb +28 -58
- data/spec/groupdocs/signature/contact_spec.rb +7 -7
- data/spec/groupdocs/signature/envelope_spec.rb +30 -34
- data/spec/groupdocs/signature/field_spec.rb +5 -5
- data/spec/groupdocs/signature/form_spec.rb +28 -16
- data/spec/groupdocs/signature/list_spec.rb +3 -3
- data/spec/groupdocs/signature/role_spec.rb +2 -2
- data/spec/groupdocs/signature/template_spec.rb +4 -4
- data/spec/groupdocs/signature_spec.rb +7 -20
- data/spec/groupdocs/storage/file_spec.rb +24 -80
- data/spec/groupdocs/storage/folder_spec.rb +14 -14
- data/spec/groupdocs/storage/package_spec.rb +2 -2
- data/spec/groupdocs/storage_spec.rb +1 -1
- data/spec/groupdocs/subscription_spec.rb +4 -123
- data/spec/groupdocs/user_spec.rb +14 -243
- data/spec/spec_helper.rb +4 -0
- data/spec/support/json/annotation_marker_move.json +11 -0
- data/spec/support/json/envelope_recipient_add.json +27 -0
- data/spec/support/json/job_documents.json +35 -103
- data/spec/support/shared_examples/signature/shared/document_methods.rb +4 -4
- data/spec/support/shared_examples/signature/shared/entity_methods.rb +10 -10
- data/spec/support/shared_examples/signature/shared/field_methods.rb +14 -18
- data/spec/support/shared_examples/signature/shared/recipient_methods.rb +3 -3
- data/spec/support/shared_examples/signature/shared/resource_methods.rb +2 -2
- metadata +13 -7
@@ -12,11 +12,11 @@ describe GroupDocs::Signature::Contact do
|
|
12
12
|
it 'accepts access credentials hash' do
|
13
13
|
lambda do
|
14
14
|
described_class.get!({}, :client_id => 'client_id', :private_key => 'private_key')
|
15
|
-
end.should_not raise_error(
|
15
|
+
end.should_not raise_error()
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'allows passing options' do
|
19
|
-
lambda { described_class.get!(:page => 1, :email => 'com') }.should_not raise_error(
|
19
|
+
lambda { described_class.get!(:page => 1, :email => 'com') }.should_not raise_error()
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'returns array of GroupDocs::Signature::Contact objects' do
|
@@ -40,7 +40,7 @@ describe GroupDocs::Signature::Contact do
|
|
40
40
|
it 'accepts access credentials hash' do
|
41
41
|
lambda do
|
42
42
|
described_class.import!([contact], :client_id => 'client_id', :private_key => 'private_key')
|
43
|
-
end.should_not raise_error(
|
43
|
+
end.should_not raise_error()
|
44
44
|
end
|
45
45
|
|
46
46
|
it 'raises error if contacts is not array' do
|
@@ -74,7 +74,7 @@ describe GroupDocs::Signature::Contact do
|
|
74
74
|
it 'accepts access credentials hash' do
|
75
75
|
lambda do
|
76
76
|
described_class.add_integration!(integration, :client_id => 'client_id', :private_key => 'private_key')
|
77
|
-
end.should_not raise_error(
|
77
|
+
end.should_not raise_error()
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
@@ -96,7 +96,7 @@ describe GroupDocs::Signature::Contact do
|
|
96
96
|
it 'accepts access credentials hash' do
|
97
97
|
lambda do
|
98
98
|
subject.add!(:client_id => 'client_id', :private_key => 'private_key')
|
99
|
-
end.should_not raise_error(
|
99
|
+
end.should_not raise_error()
|
100
100
|
end
|
101
101
|
|
102
102
|
it 'uses hashed version of self as request body' do
|
@@ -119,7 +119,7 @@ describe GroupDocs::Signature::Contact do
|
|
119
119
|
it 'accepts access credentials hash' do
|
120
120
|
lambda do
|
121
121
|
subject.update!(:client_id => 'client_id', :private_key => 'private_key')
|
122
|
-
end.should_not raise_error(
|
122
|
+
end.should_not raise_error()
|
123
123
|
end
|
124
124
|
|
125
125
|
it 'uses hashed version of self as request body' do
|
@@ -136,7 +136,7 @@ describe GroupDocs::Signature::Contact do
|
|
136
136
|
it 'accepts access credentials hash' do
|
137
137
|
lambda do
|
138
138
|
subject.delete!(:client_id => 'client_id', :private_key => 'private_key')
|
139
|
-
end.should_not raise_error(
|
139
|
+
end.should_not raise_error()
|
140
140
|
end
|
141
141
|
end
|
142
142
|
end
|
@@ -18,11 +18,11 @@ describe GroupDocs::Signature::Envelope do
|
|
18
18
|
it 'accepts access credentials hash' do
|
19
19
|
lambda do
|
20
20
|
described_class.all!({}, :client_id => 'client_id', :private_key => 'private_key')
|
21
|
-
end.should_not raise_error(
|
21
|
+
end.should_not raise_error()
|
22
22
|
end
|
23
23
|
|
24
24
|
it 'allows passing options' do
|
25
|
-
lambda { described_class.all!(:page => 1, :count => 3) }.should_not raise_error(
|
25
|
+
lambda { described_class.all!(:page => 1, :count => 3) }.should_not raise_error()
|
26
26
|
end
|
27
27
|
|
28
28
|
it 'returns array of GroupDocs::Signature::Envelope objects' do
|
@@ -42,11 +42,11 @@ describe GroupDocs::Signature::Envelope do
|
|
42
42
|
it 'accepts access credentials hash' do
|
43
43
|
lambda do
|
44
44
|
described_class.for_me!({}, :client_id => 'client_id', :private_key => 'private_key')
|
45
|
-
end.should_not raise_error(
|
45
|
+
end.should_not raise_error()
|
46
46
|
end
|
47
47
|
|
48
48
|
it 'allows passing options' do
|
49
|
-
lambda { described_class.for_me!(:page => 1, :count => 3) }.should_not raise_error(
|
49
|
+
lambda { described_class.for_me!(:page => 1, :count => 3) }.should_not raise_error()
|
50
50
|
end
|
51
51
|
|
52
52
|
it 'returns array of GroupDocs::Signature::Envelope objects' do
|
@@ -78,18 +78,18 @@ describe GroupDocs::Signature::Envelope do
|
|
78
78
|
end
|
79
79
|
|
80
80
|
describe '#add_recipient!' do
|
81
|
-
|
82
|
-
|
81
|
+
before(:each) do
|
82
|
+
mock_api_server(load_json('envelope_recipient_add'))
|
83
83
|
end
|
84
84
|
|
85
|
-
|
86
|
-
|
85
|
+
let(:recipient) do
|
86
|
+
GroupDocs::Signature::Recipient.new
|
87
87
|
end
|
88
88
|
|
89
89
|
it 'accepts access credentials hash' do
|
90
90
|
lambda do
|
91
91
|
subject.add_recipient!(recipient, :client_id => 'client_id', :private_key => 'private_key')
|
92
|
-
end.should_not raise_error(
|
92
|
+
end.should_not raise_error()
|
93
93
|
end
|
94
94
|
|
95
95
|
it 'raises error if recipient is not GroupDocs::Signature::Recipient object' do
|
@@ -109,7 +109,7 @@ describe GroupDocs::Signature::Envelope do
|
|
109
109
|
it 'accepts access credentials hash' do
|
110
110
|
lambda do
|
111
111
|
subject.modify_recipient!(recipient, :client_id => 'client_id', :private_key => 'private_key')
|
112
|
-
end.should_not raise_error(
|
112
|
+
end.should_not raise_error()
|
113
113
|
end
|
114
114
|
|
115
115
|
it 'raises error if recipient is not GroupDocs::Signature::Recipient object' do
|
@@ -128,7 +128,7 @@ describe GroupDocs::Signature::Envelope do
|
|
128
128
|
it 'accepts access credentials hash' do
|
129
129
|
lambda do
|
130
130
|
subject.delegate_recipient!(old, new, :client_id => 'client_id', :private_key => 'private_key')
|
131
|
-
end.should_not raise_error(
|
131
|
+
end.should_not raise_error()
|
132
132
|
end
|
133
133
|
|
134
134
|
it 'raises error if old recipient is not GroupDocs::Signature::Recipient object' do
|
@@ -152,11 +152,11 @@ describe GroupDocs::Signature::Envelope do
|
|
152
152
|
it 'accepts access credentials hash' do
|
153
153
|
lambda do
|
154
154
|
subject.fill_field!('test', field, document, recipient, {}, :client_id => 'client_id', :private_key => 'private_key')
|
155
|
-
end.should_not raise_error(
|
155
|
+
end.should_not raise_error()
|
156
156
|
end
|
157
157
|
|
158
158
|
it 'can be public' do
|
159
|
-
lambda { subject.fill_field!('test', field, document, recipient, :public => true) }.should_not raise_error(
|
159
|
+
lambda { subject.fill_field!('test', field, document, recipient, :public => true) }.should_not raise_error()
|
160
160
|
end
|
161
161
|
|
162
162
|
it 'raises error if field is not GroupDocs::Signature::Field object' do
|
@@ -176,8 +176,8 @@ describe GroupDocs::Signature::Envelope do
|
|
176
176
|
end
|
177
177
|
|
178
178
|
it 'uses signature identifier if field is :signature and GroupDocs::Signature is passed' do
|
179
|
-
api =
|
180
|
-
api.stub
|
179
|
+
api = double(GroupDocs::Api::Request)
|
180
|
+
api.stub(:execute! => { :field => {} })
|
181
181
|
GroupDocs::Api::Request.stub(:new => api)
|
182
182
|
signature = GroupDocs::Signature.new(:id => '123')
|
183
183
|
api.should_receive(:add_params).with(:signatureId => '123')
|
@@ -186,10 +186,10 @@ describe GroupDocs::Signature::Envelope do
|
|
186
186
|
end
|
187
187
|
|
188
188
|
it 'converts boolean value to required string if field is :checkbox' do
|
189
|
-
api =
|
189
|
+
api = double(GroupDocs::Api::Request)
|
190
190
|
options = {}
|
191
|
-
api.stub
|
192
|
-
api.stub
|
191
|
+
api.stub(:execute! => { :field => {} })
|
192
|
+
api.stub(:options => { :request_body => nil })
|
193
193
|
GroupDocs::Api::Request.stub(:new => api)
|
194
194
|
field.field_type = :checkbox
|
195
195
|
subject.fill_field!(true, field, document, recipient)
|
@@ -206,12 +206,8 @@ describe GroupDocs::Signature::Envelope do
|
|
206
206
|
|
207
207
|
it 'accepts access credentials hash' do
|
208
208
|
lambda do
|
209
|
-
subject.sign!(recipient, {},
|
210
|
-
end.should_not raise_error(
|
211
|
-
end
|
212
|
-
|
213
|
-
it 'can be public' do
|
214
|
-
lambda { subject.fill_field!('test', field, document, recipient, :public => true) }.should_not raise_error(ArgumentError)
|
209
|
+
subject.sign!(recipient, {}, :client_id => 'client_id', :private_key => 'private_key')
|
210
|
+
end.should_not raise_error()
|
215
211
|
end
|
216
212
|
|
217
213
|
it 'raises error if recipient is not GroupDocs::Signature::Recipient object' do
|
@@ -229,7 +225,7 @@ describe GroupDocs::Signature::Envelope do
|
|
229
225
|
it 'accepts access credentials hash' do
|
230
226
|
lambda do
|
231
227
|
subject.decline!(recipient, :client_id => 'client_id', :private_key => 'private_key')
|
232
|
-
end.should_not raise_error(
|
228
|
+
end.should_not raise_error()
|
233
229
|
end
|
234
230
|
|
235
231
|
it 'raises error if recipient is not GroupDocs::Signature::Recipient object' do
|
@@ -262,7 +258,7 @@ describe GroupDocs::Signature::Envelope do
|
|
262
258
|
end
|
263
259
|
|
264
260
|
it 'downloads ZIP file' do
|
265
|
-
file =
|
261
|
+
file = double('file')
|
266
262
|
subject.stub(:documents! => [])
|
267
263
|
Object::File.should_receive(:open).with("#{path}/#{subject.name}.zip", 'wb').and_yield(file)
|
268
264
|
file.should_receive(:write).with(File.read('spec/support/files/envelope.zip'))
|
@@ -276,7 +272,7 @@ describe GroupDocs::Signature::Envelope do
|
|
276
272
|
end
|
277
273
|
|
278
274
|
it 'downloads PDF file' do
|
279
|
-
file =
|
275
|
+
file = double('file')
|
280
276
|
subject.stub(:documents! => [1])
|
281
277
|
Object::File.should_receive(:open).with("#{path}/#{subject.name}.pdf", 'wb').and_yield(file)
|
282
278
|
file.should_receive(:write).with(File.read('spec/support/files/resume.pdf'))
|
@@ -290,7 +286,7 @@ describe GroupDocs::Signature::Envelope do
|
|
290
286
|
end
|
291
287
|
|
292
288
|
it 'downloads ZIP file' do
|
293
|
-
file =
|
289
|
+
file = double('file')
|
294
290
|
subject.stub(:documents! => [1, 2])
|
295
291
|
Object::File.should_receive(:open).with("#{path}/#{subject.name}.zip", 'wb').and_yield(file)
|
296
292
|
file.should_receive(:write).with(File.read('spec/support/files/envelope.zip'))
|
@@ -311,7 +307,7 @@ describe GroupDocs::Signature::Envelope do
|
|
311
307
|
it 'accepts access credentials hash' do
|
312
308
|
lambda do
|
313
309
|
subject.signed_document!(document, path, :client_id => 'client_id', :private_key => 'private_key')
|
314
|
-
end.should_not raise_error(
|
310
|
+
end.should_not raise_error()
|
315
311
|
end
|
316
312
|
|
317
313
|
it 'returns saved file path' do
|
@@ -319,7 +315,7 @@ describe GroupDocs::Signature::Envelope do
|
|
319
315
|
end
|
320
316
|
|
321
317
|
it 'downloads PDF file' do
|
322
|
-
file =
|
318
|
+
file = double('file')
|
323
319
|
Object::File.should_receive(:open).with("#{path}/#{subject.name}.pdf", 'wb').and_yield(file)
|
324
320
|
file.should_receive(:write).with(File.read('spec/support/files/resume.pdf'))
|
325
321
|
subject.signed_document!(document, path)
|
@@ -334,7 +330,7 @@ describe GroupDocs::Signature::Envelope do
|
|
334
330
|
it 'accepts access credentials hash' do
|
335
331
|
lambda do
|
336
332
|
subject.logs!(:client_id => 'client_id', :private_key => 'private_key')
|
337
|
-
end.should_not raise_error(
|
333
|
+
end.should_not raise_error()
|
338
334
|
end
|
339
335
|
|
340
336
|
it 'returns array of GroupDocs::Signature::Envelope::Log objects' do
|
@@ -354,7 +350,7 @@ describe GroupDocs::Signature::Envelope do
|
|
354
350
|
it 'accepts access credentials hash' do
|
355
351
|
lambda do
|
356
352
|
subject.send!(nil, :client_id => 'client_id', :private_key => 'private_key')
|
357
|
-
end.should_not raise_error(
|
353
|
+
end.should_not raise_error()
|
358
354
|
end
|
359
355
|
|
360
356
|
it 'accepts webhook callback URL and sends it as plain text' do
|
@@ -370,7 +366,7 @@ describe GroupDocs::Signature::Envelope do
|
|
370
366
|
it 'accepts access credentials hash' do
|
371
367
|
lambda do
|
372
368
|
subject.archive!(:client_id => 'client_id', :private_key => 'private_key')
|
373
|
-
end.should_not raise_error(
|
369
|
+
end.should_not raise_error()
|
374
370
|
end
|
375
371
|
end
|
376
372
|
|
@@ -382,7 +378,7 @@ describe GroupDocs::Signature::Envelope do
|
|
382
378
|
it 'accepts access credentials hash' do
|
383
379
|
lambda do
|
384
380
|
subject.restart!(:client_id => 'client_id', :private_key => 'private_key')
|
385
|
-
end.should_not raise_error(
|
381
|
+
end.should_not raise_error()
|
386
382
|
end
|
387
383
|
end
|
388
384
|
end
|
@@ -12,11 +12,11 @@ describe GroupDocs::Signature::Field do
|
|
12
12
|
it 'accepts access credentials hash' do
|
13
13
|
lambda do
|
14
14
|
described_class.get!({}, :client_id => 'client_id', :private_key => 'private_key')
|
15
|
-
end.should_not raise_error(
|
15
|
+
end.should_not raise_error()
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'allows passing options' do
|
19
|
-
lambda { described_class.get!(:id => "dsaoij3928ukr03") }.should_not raise_error(
|
19
|
+
lambda { described_class.get!(:id => "dsaoij3928ukr03") }.should_not raise_error()
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'returns array of GroupDocs::Signature::Field objects' do
|
@@ -189,7 +189,7 @@ describe GroupDocs::Signature::Field do
|
|
189
189
|
it 'accepts access credentials hash' do
|
190
190
|
lambda do
|
191
191
|
subject.create!(:client_id => 'client_id', :private_key => 'private_key')
|
192
|
-
end.should_not raise_error(
|
192
|
+
end.should_not raise_error()
|
193
193
|
end
|
194
194
|
|
195
195
|
it 'uses hashed version of self as request body' do
|
@@ -212,7 +212,7 @@ describe GroupDocs::Signature::Field do
|
|
212
212
|
it 'accepts access credentials hash' do
|
213
213
|
lambda do
|
214
214
|
subject.modify!(:client_id => 'client_id', :private_key => 'private_key')
|
215
|
-
end.should_not raise_error(
|
215
|
+
end.should_not raise_error()
|
216
216
|
end
|
217
217
|
|
218
218
|
it 'uses hashed version of self as request body' do
|
@@ -229,7 +229,7 @@ describe GroupDocs::Signature::Field do
|
|
229
229
|
it 'accepts access credentials hash' do
|
230
230
|
lambda do
|
231
231
|
subject.delete!(:client_id => 'client_id', :private_key => 'private_key')
|
232
|
-
end.should_not raise_error(
|
232
|
+
end.should_not raise_error()
|
233
233
|
end
|
234
234
|
end
|
235
235
|
end
|
@@ -16,11 +16,11 @@ describe GroupDocs::Signature::Form do
|
|
16
16
|
it 'accepts access credentials hash' do
|
17
17
|
lambda do
|
18
18
|
described_class.all!({}, :client_id => 'client_id', :private_key => 'private_key')
|
19
|
-
end.should_not raise_error(
|
19
|
+
end.should_not raise_error()
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'allows passing options' do
|
23
|
-
lambda { described_class.all!(:page => 1, :count => 3) }.should_not raise_error(
|
23
|
+
lambda { described_class.all!(:page => 1, :count => 3) }.should_not raise_error()
|
24
24
|
end
|
25
25
|
|
26
26
|
it 'returns array of GroupDocs::Signature::Form objects' do
|
@@ -77,12 +77,12 @@ describe GroupDocs::Signature::Form do
|
|
77
77
|
end
|
78
78
|
end
|
79
79
|
|
80
|
-
describe '#fields_in_final_file_name' do
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
end
|
80
|
+
#describe '#fields_in_final_file_name' do
|
81
|
+
# it 'returns field names in human-readable format' do
|
82
|
+
# subject.fields_in_final_file_name = %w(on off)
|
83
|
+
# subject.fields_in_final_file_name.should == %w(on off)
|
84
|
+
# end
|
85
|
+
#end
|
86
86
|
|
87
87
|
describe '#create!' do
|
88
88
|
before(:each) do
|
@@ -92,13 +92,13 @@ describe GroupDocs::Signature::Form do
|
|
92
92
|
it 'accepts access credentials hash' do
|
93
93
|
lambda do
|
94
94
|
subject.create!({}, :client_id => 'client_id', :private_key => 'private_key')
|
95
|
-
end.should_not raise_error(
|
95
|
+
end.should_not raise_error()
|
96
96
|
end
|
97
97
|
|
98
98
|
it 'accepts options hash' do
|
99
99
|
lambda do
|
100
100
|
subject.create!(:assembly_id => 'aodfh43yr9834hf943h')
|
101
|
-
end.should_not raise_error(
|
101
|
+
end.should_not raise_error()
|
102
102
|
end
|
103
103
|
|
104
104
|
it 'uses hashed version of self as request body' do
|
@@ -121,11 +121,11 @@ describe GroupDocs::Signature::Form do
|
|
121
121
|
it 'accepts access credentials hash' do
|
122
122
|
lambda do
|
123
123
|
subject.documents!({}, :client_id => 'client_id', :private_key => 'private_key')
|
124
|
-
end.should_not raise_error(
|
124
|
+
end.should_not raise_error()
|
125
125
|
end
|
126
126
|
|
127
127
|
it 'can be public' do
|
128
|
-
lambda { subject.documents!(:public => true) }.should_not raise_error(
|
128
|
+
lambda { subject.documents!(:public => true) }.should_not raise_error()
|
129
129
|
end
|
130
130
|
|
131
131
|
it 'returns array of GroupDocs::Document objects' do
|
@@ -145,7 +145,7 @@ describe GroupDocs::Signature::Form do
|
|
145
145
|
it 'accepts access credentials hash' do
|
146
146
|
lambda do
|
147
147
|
subject.publish!(:client_id => 'client_id', :private_key => 'private_key')
|
148
|
-
end.should_not raise_error(
|
148
|
+
end.should_not raise_error()
|
149
149
|
end
|
150
150
|
end
|
151
151
|
|
@@ -157,7 +157,7 @@ describe GroupDocs::Signature::Form do
|
|
157
157
|
it 'accepts access credentials hash' do
|
158
158
|
lambda do
|
159
159
|
subject.complete!(:client_id => 'client_id', :private_key => 'private_key')
|
160
|
-
end.should_not raise_error(
|
160
|
+
end.should_not raise_error()
|
161
161
|
end
|
162
162
|
end
|
163
163
|
|
@@ -169,12 +169,13 @@ describe GroupDocs::Signature::Form do
|
|
169
169
|
it 'accepts access credentials hash' do
|
170
170
|
lambda do
|
171
171
|
subject.archive!(:client_id => 'client_id', :private_key => 'private_key')
|
172
|
-
end.should_not raise_error(
|
172
|
+
end.should_not raise_error()
|
173
173
|
end
|
174
174
|
end
|
175
175
|
|
176
176
|
describe '#update_from_template!' do
|
177
177
|
let(:template) { GroupDocs::Signature::Template.new }
|
178
|
+
let(:form) { GroupDocs::Signature::Form.new }
|
178
179
|
|
179
180
|
before(:each) do
|
180
181
|
mock_api_server('{ "status": "Ok", "result": {}}')
|
@@ -187,7 +188,18 @@ describe GroupDocs::Signature::Form do
|
|
187
188
|
it 'accepts access credentials hash' do
|
188
189
|
lambda do
|
189
190
|
subject.update_from_template!(template, :client_id => 'client_id', :private_key => 'private_key')
|
190
|
-
end.should_not raise_error(
|
191
|
+
end.should_not raise_error()
|
192
|
+
end
|
193
|
+
end
|
194
|
+
describe '#get_fields!' do
|
195
|
+
before(:each) do
|
196
|
+
mock_api_server(load_json('signature_fields_get'))
|
197
|
+
end
|
198
|
+
|
199
|
+
it 'accepts access credentials hash' do
|
200
|
+
lambda do
|
201
|
+
subject.get_fields!({}, :client_id => 'client_id', :private_key => 'private_key')
|
202
|
+
end.should_not raise_error()
|
191
203
|
end
|
192
204
|
end
|
193
205
|
end
|
@@ -12,7 +12,7 @@ describe GroupDocs::Signature::List do
|
|
12
12
|
it 'accepts access credentials hash' do
|
13
13
|
lambda do
|
14
14
|
described_class.get!(:client_id => 'client_id', :private_key => 'private_key')
|
15
|
-
end.should_not raise_error(
|
15
|
+
end.should_not raise_error()
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'returns array of GroupDocs::Signature::List objects' do
|
@@ -58,7 +58,7 @@ describe GroupDocs::Signature::List do
|
|
58
58
|
it 'accepts access credentials hash' do
|
59
59
|
lambda do
|
60
60
|
subject.add!(:client_id => 'client_id', :private_key => 'private_key')
|
61
|
-
end.should_not raise_error(
|
61
|
+
end.should_not raise_error()
|
62
62
|
end
|
63
63
|
|
64
64
|
it 'uses hashed version of self as request body' do
|
@@ -81,7 +81,7 @@ describe GroupDocs::Signature::List do
|
|
81
81
|
it 'accepts access credentials hash' do
|
82
82
|
lambda do
|
83
83
|
subject.delete!(:client_id => 'client_id', :private_key => 'private_key')
|
84
|
-
end.should_not raise_error(
|
84
|
+
end.should_not raise_error()
|
85
85
|
end
|
86
86
|
end
|
87
87
|
end
|
@@ -12,11 +12,11 @@ describe GroupDocs::Signature::Role do
|
|
12
12
|
it 'accepts access credentials hash' do
|
13
13
|
lambda do
|
14
14
|
described_class.get!({}, :client_id => 'client_id', :private_key => 'private_key')
|
15
|
-
end.should_not raise_error(
|
15
|
+
end.should_not raise_error()
|
16
16
|
end
|
17
17
|
|
18
18
|
it 'allows passing options' do
|
19
|
-
lambda { described_class.get!(:id => "dsaoij3928ukr03") }.should_not raise_error(
|
19
|
+
lambda { described_class.get!(:id => "dsaoij3928ukr03") }.should_not raise_error()
|
20
20
|
end
|
21
21
|
|
22
22
|
it 'returns array of GroupDocs::Signature::Role objects' do
|