Skip to content

Commit 940194b

Browse files
committed
refactor url in integration test
1 parent 70eb65b commit 940194b

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/integration/tasks.test.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -265,12 +265,11 @@ describe("Tasks", function () {
265265
const searchTerm = "task";
266266
chai
267267
.request(app)
268-
.get(`/tasks?q=searchTerm:"${encodeURIComponent(searchTerm)}"`)
268+
.get("/tasks?q=searchTerm:task")
269269
.end((err, res) => {
270270
if (err) {
271271
return done(err);
272272
}
273-
274273
expect(res).to.have.status(200);
275274
expect(res.body).to.be.a("object");
276275
expect(res.body.message).to.equal("Filter tasks returned successfully!");
@@ -285,10 +284,9 @@ describe("Tasks", function () {
285284
});
286285
});
287286
it("Should get tasks filtered by search term and handle no tasks found", function (done) {
288-
const searchTerm = " ";
289287
chai
290288
.request(app)
291-
.get(`/tasks?q=searchTerm:"${encodeURIComponent(searchTerm)}"`)
289+
.get(`/tasks?q=searchTerm:random1`)
292290
.end((err, res) => {
293291
if (err) {
294292
return done(err);

0 commit comments

Comments
 (0)