diff --git a/lib/manage-prototype-handlers.test.js b/lib/manage-prototype-handlers.test.js index 06be2ea4ab..b3ea81bdf7 100644 --- a/lib/manage-prototype-handlers.test.js +++ b/lib/manage-prototype-handlers.test.js @@ -467,25 +467,14 @@ describe('manage-prototype-handlers', () => { }) }) - describe('postPluginsHandler', () => { + it('postPluginsHandler', async () => { const search = 'task list' const routePath = '/plugins-installed' const fullPath = '/manage-prototype' + routePath - beforeEach(() => { - req.body.search = search - req.route.path = routePath - }) - - it('search', async () => { - await postPluginsHandler(req, res) - expect(res.redirect).toHaveBeenCalledWith(fullPath + '?search=' + search) - }) - - it('clear search', async () => { - req.query.clear = 'true' - await postPluginsHandler(req, res) - expect(res.redirect).toHaveBeenCalledWith(fullPath) - }) + req.body.search = search + req.route.path = routePath + await postPluginsHandler(req, res) + expect(res.redirect).toHaveBeenCalledWith(fullPath + '?search=' + search) }) it('getPluginsModeHandler', async () => {