Skip to content

Commit

Permalink
changed test
Browse files Browse the repository at this point in the history
  • Loading branch information
jose-carlos-sousa committed Feb 20, 2024
1 parent d2e1df9 commit 14c8def
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/end-to-end/offer.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,21 @@ describe("Offer endpoint tests", () => {
FieldValidatorTester.mustBeFuture();
FieldValidatorTester.mustBeAfter("publishDate");
});

describe("jobMinDuration", () => {
const FieldValidatorTester = BodyValidatorTester("jobMinDuration");
if (BodyValidatorTester("jobType") !== "freelance") {
FieldValidatorTester.isRequired();
FieldValidatorTester.mustBeNumber();
}
});
describe("jobMaxDuration", () => {
const FieldValidatorTester = BodyValidatorTester("jobMaxDuration");
if (BodyValidatorTester("jobType") !== "freelance") {
FieldValidatorTester.isRequired();
FieldValidatorTester.mustBeNumber();
FieldValidatorTester.mustBeGreaterThanOrEqualToField("jobMinDuration");
}
});
describe("jobStartDate", () => {
const FieldValidatorTester = BodyValidatorTester("jobStartDate");
FieldValidatorTester.mustBeDate();
Expand Down

0 comments on commit 14c8def

Please sign in to comment.