hellosign-api 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hello_sign/api/template.rb +1 -0
- data/lib/hello_sign/version.rb +1 -1
- data/spec/fixtures/template_draft.json +7 -0
- data/spec/hello_sign/api/template_spec.rb +32 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4666b6681f4d92b608c07eb22db61bdbd466fb797d83ddd2cd56319ba0607569
|
4
|
+
data.tar.gz: bad67e806000fc4c2c7f33af059c4f92795bec1c1e00382001c9f008bc965a15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c04af622689d244d0a3290af96f2c68e1fe25c033a3567157706a4e66ea46f3d342cf856fd7235eb58bf574f48c8decb18cce69e509ee1bb74c5eafe771a2297
|
7
|
+
data.tar.gz: 64726079c3b8832a85290dc87869cc41132969fb6668ae4a3738c7a64c0a3cdbf78d7eab660b66639beec164b77f594d1d09fe14cd850fb58d1cdbf9a76b78c2
|
data/lib/hello_sign/version.rb
CHANGED
@@ -169,4 +169,36 @@ describe HelloSign::Api::Template do
|
|
169
169
|
expect(@template.headers).to_not be_nil
|
170
170
|
end
|
171
171
|
end
|
172
|
+
|
173
|
+
describe '#create_embedded_template_draft' do
|
174
|
+
before do
|
175
|
+
stub_post('/template/create_embedded_draft', 'template_draft')
|
176
|
+
@template_draft = HelloSign.create_embedded_template_draft :title => 'Document Test', :file_url => 'http://hellosign.com/test.pdf'
|
177
|
+
end
|
178
|
+
|
179
|
+
it 'should return a Template Draft' do
|
180
|
+
expect(@template_draft).to be_an HelloSign::Resource::TemplateDraft
|
181
|
+
end
|
182
|
+
|
183
|
+
it 'should return response headers' do
|
184
|
+
expect(@template_draft.headers).to_not be_nil
|
185
|
+
end
|
186
|
+
|
187
|
+
context 'with multiple signer_roles' do
|
188
|
+
before do
|
189
|
+
stub_post('/template/create_embedded_draft', 'template_draft')
|
190
|
+
@template_draft = HelloSign.create_embedded_template_draft(
|
191
|
+
:title => 'Document Test',
|
192
|
+
:file_url => 'http://hellosign.com/test.pdf',
|
193
|
+
:signer_roles => [{ :name => 'Employee' }, { :name => 'CEO' }]
|
194
|
+
)
|
195
|
+
end
|
196
|
+
|
197
|
+
it 'should send signer_roles as json' do
|
198
|
+
expect(a_post('/template/create_embedded_draft').with(
|
199
|
+
:body => hash_including({ :signer_roles => [{ :name => 'Employee' }, { :name => 'CEO' }] }))
|
200
|
+
).to have_been_made
|
201
|
+
end
|
202
|
+
end
|
203
|
+
end
|
172
204
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hellosign-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- HelloSign, Aubrey Holland
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -182,6 +182,7 @@ files:
|
|
182
182
|
- spec/fixtures/signature_requests.json
|
183
183
|
- spec/fixtures/team.json
|
184
184
|
- spec/fixtures/template.json
|
185
|
+
- spec/fixtures/template_draft.json
|
185
186
|
- spec/fixtures/templates.json
|
186
187
|
- spec/fixtures/token.json
|
187
188
|
- spec/fixtures/unclaimed_draft.json
|
@@ -240,6 +241,7 @@ test_files:
|
|
240
241
|
- spec/fixtures/signature_requests.json
|
241
242
|
- spec/fixtures/team.json
|
242
243
|
- spec/fixtures/template.json
|
244
|
+
- spec/fixtures/template_draft.json
|
243
245
|
- spec/fixtures/templates.json
|
244
246
|
- spec/fixtures/token.json
|
245
247
|
- spec/fixtures/unclaimed_draft.json
|