You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it("should return 400 if any status other than not_submitted, pending, accepted, rejected, requested_changes is passed when dev flag is present",function(done){
Copy file name to clipboardExpand all lines: test/unit/middlewares/application-validator.test.ts
+60-11Lines changed: 60 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -8,8 +8,8 @@ describe("application validator test", function () {
8
8
describe("validateApplicationData",function(){
9
9
it("should call next function if everything is according to the validator",asyncfunction(){
10
10
constrawData={
11
-
...applicationsData[6]
12
-
}
11
+
...applicationsData[6],
12
+
};
13
13
14
14
constreq={
15
15
body: rawData,
@@ -21,7 +21,7 @@ describe("application validator test", function () {
21
21
});
22
22
23
23
it("should not call the next function if a required field is missed",asyncfunction(){
24
-
constrawData={ ...applicationsData[6]}
24
+
constrawData={ ...applicationsData[6]};
25
25
deleterawData.numberOfHours;
26
26
27
27
constreq={
@@ -40,10 +40,10 @@ describe("application validator test", function () {
40
40
});
41
41
42
42
it("should not call the next function if any of the values which have a wordCount restriction doesn't contain the expected number of words",asyncfunction(){
43
-
constrawData={
44
-
...applicationsData[6],
45
-
whyRds: 'jfaskdfjsd'
46
-
};
43
+
constrawData={
44
+
...applicationsData[6],
45
+
whyRds: "jfaskdfjsd",
46
+
};
47
47
48
48
constreq={
49
49
body: rawData,
@@ -61,10 +61,10 @@ describe("application validator test", function () {
61
61
});
62
62
63
63
it("should not call the next function if number of hours is not a number",asyncfunction(){
64
-
constrawData={
65
-
...applicationsData[6],
66
-
numberOfHours: '10'
67
-
};
64
+
constrawData={
65
+
...applicationsData[6],
66
+
numberOfHours: "10",
67
+
};
68
68
69
69
constreq={
70
70
body: rawData,
@@ -133,6 +133,55 @@ describe("application validator test", function () {
0 commit comments