Add support for scoped packages in blacklist URLs

This commit is contained in:
MICHAEL JACKSON
2017-11-14 16:47:57 -08:00
parent 4e31fd02cf
commit 36efac099f
4 changed files with 69 additions and 27 deletions

View File

@ -199,6 +199,19 @@ describe('The server', () => {
})
})
})
it('can remove a scoped package from the blacklist', done => {
withToken({ blacklist: { remove: true } }, token => {
request(server)
.delete('/_blacklist/@scope/bad-package')
.send({ token })
.end((err, res) => {
expect(res.statusCode).toBe(200)
expect(res.body.ok).toBe(true)
done()
})
})
})
})
})
})