-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
42 lines (37 loc) · 1.11 KB
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const { getPatientHash, getApptHash, getSplitHash } = require("./index.js");
var assert = require("assert");
describe("Hash Tests", () => {
describe("Check Patient Hash", () => {
it("should return the same as the db", () => {
assert.equal(
getPatientHash("21", "", "", "[email protected]"),
"mlGAYllHS0F/2laQtJemY1kkUeJHc1Z3SEeuVM0OIDE="
);
});
});
describe("Check Appointment Hash", () => {
it("should return the same as the db", () => {
assert.equal(
getApptHash(1, 21, "2021-12-08 09:00:00"),
"Q/yxow81LjGnXd8NmteMUdfQyqOJCp93ZnPvLS/mzeA="
);
});
});
describe("Check Appointment Hash", () => {
it("should blow up if my status is out of range", function () {
try {
getApptHash(222, 21, "2021-12-08 09:00:00");
} catch {
assert.equal(true, true);
}
});
});
describe("Check Pay Split Hash", () => {
it("should return the same as the db", function () {
assert.equal(
getSplitHash(54, 34, "2021-12-08"),
"dmwhKExsA0GylTnPEa3lXK51ZKD0yYBbLidvGua4EdY="
);
});
});
});