Skip to content

Commit acbbdd5

Browse files
authored
Merge pull request #58 from eversign/fixing-tests
Fixes for tests
2 parents 2f0bdd7 + 3935a25 commit acbbdd5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

test/test.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('Signer.toObject()' , function functionName() {
8080

8181
describe('Document' , function functionName() {
8282

83-
it.skip("should get created without a problem", function (done) {
83+
it("should get created without a problem", function (done) {
8484
var document = new Document();
8585
document.setDocumentHash("My Document");
8686
document.setTitle("Title goes here");
@@ -98,6 +98,12 @@ describe('Document' , function functionName() {
9898
signer.setEmail('[email protected]')
9999
document.appendSigner(signer.toObject());
100100

101+
var file = new File({
102+
name: 'My File',
103+
filePath: path.join(__dirname, 'raw.pdf'),
104+
});
105+
document.appendFile(file);
106+
101107
var client = new Client(key, businessId);
102108
client
103109
.createDocument(document)
@@ -108,7 +114,7 @@ describe('Document' , function functionName() {
108114
.catch(done);
109115
});
110116

111-
it.skip("should upload a file without a problem", function (done) {
117+
it("should upload a file without a problem", function (done) {
112118
var document = new Document();
113119
document.setDocumentHash("My Document");
114120
document.setTitle("Title goes here");
@@ -150,7 +156,7 @@ describe('Document' , function functionName() {
150156

151157
var file = new File({
152158
name: 'My File',
153-
fileBase64: fs.readFileSync("raw.pdf").toString("base64"),
159+
fileBase64: fs.readFileSync(__dirname+"/raw.pdf").toString("base64"),
154160
});
155161
document.appendFile(file);
156162

0 commit comments

Comments
 (0)