mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-04-01 02:42:23 -05:00
adding test for invalid tags, fixes #40
This commit is contained in:
parent
8840ac4c1f
commit
440f42415c
1 changed files with 8 additions and 0 deletions
|
@ -39,6 +39,14 @@ module.exports = function() {
|
|||
})
|
||||
})
|
||||
|
||||
it('add tag - bad tag', function(cb) {
|
||||
server.add_tag('testpkg-tag', 'tag/tag/tag', '0.0.1-x', function(res, body) {
|
||||
assert.equal(res.statusCode, 403)
|
||||
assert(~body.error.indexOf('invalid tag'))
|
||||
cb()
|
||||
})
|
||||
})
|
||||
|
||||
it('add tag - good', function(cb) {
|
||||
server.add_tag('testpkg-tag', 'tagtagtag', '0.0.1', function(res, body) {
|
||||
assert.equal(res.statusCode, 201)
|
||||
|
|
Loading…
Add table
Reference in a new issue