Skip to content

Commit 55413c3

Browse files
testing numeric value in minduration
1 parent 2577513 commit 55413c3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/end-to-end/offer.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,19 @@ describe("Offer endpoint tests", () => {
707707
expect(res.status).toBe(HTTPStatus.UNPROCESSABLE_ENTITY);
708708
});
709709

710+
test("should fail jobMinDuration isn't numeric value", async () => {
711+
const offer_params = generateTestOffer({
712+
jobMaxDuration: 8,
713+
jobMinDuration: "nonNumeric",
714+
owner: test_company._id,
715+
});
716+
const res = await request()
717+
.post("/offers/new")
718+
.send(withGodToken(offer_params));
719+
expect(res.status).toBe(HTTPStatus.UNPROCESSABLE_ENTITY);
720+
});
721+
722+
710723
test("should succeed if jobMaxDuration is greater than jobMinDuration", async () => {
711724
const offer_params = generateTestOffer({
712725
jobMinDuration: 8,

0 commit comments

Comments
 (0)