Skip to content

Commit 7074d4f

Browse files
committed
add getView test
1 parent 2510f0b commit 7074d4f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

test/component-tests/envelopes.spec.js

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,30 @@ test(function getRecipients (t) {
9797
});
9898
});
9999

100+
test(function getView (t) {
101+
let action = 'send';
102+
let fullName = 'DocuSign NPM';
103+
let email = config.email;
104+
let files = [{
105+
name: 'SampleDocument.pdf',
106+
extension: 'pdf',
107+
source: {
108+
type: 'path',
109+
content: 'test/SampleDocument.pdf'
110+
}
111+
}];
112+
let returnUrl = 'http://www.docusign.com/devcenter';
113+
let event = null;
114+
115+
return client.envelopes.getView(action, fullName, email, files, returnUrl, event)
116+
.then(response => {
117+
var regex = new RegExp('https://demo.docusign.net/Member/StartInSession.aspx?');
118+
t.ok(response.url);
119+
t.ok(response.envelopeId);
120+
t.ok(regex.test(response.url));
121+
});
122+
});
123+
100124
test(function getTemplateView (t) {
101125
return client.envelopes.getTemplateView(templateId, 'http://www.docusign.com/devcenter')
102126
.then(response => {

0 commit comments

Comments
 (0)