Skip to content

Commit d766fff

Browse files
committed
improved code coverage
1 parent c33ff38 commit d766fff

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/payload-encryption.test.js

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,25 @@ describe("Payload encryption", () => {
5858
assert.ok(body.encryptedItems.oaepHashingAlgorithm);
5959
});
6060

61+
it("elem not found", () => {
62+
let body = {
63+
itemsToEncrypt: {
64+
first: "first",
65+
second: "second"
66+
},
67+
dontEncrypt: {
68+
text: "just text..."
69+
}
70+
};
71+
encryptBody.call(fle, {
72+
element: "not.found",
73+
obj: "encryptedItems"
74+
}, body);
75+
assert.ok(body.dontEncrypt);
76+
assert.ok(body.itemsToEncrypt);
77+
assert.ok(!body.encryptedItems);
78+
});
79+
6180
it("nested object to encrypt", () => {
6281
let body = {
6382
path: {

0 commit comments

Comments
 (0)