it('Should have a correct config on a server with registration enabled and a users limit', function (done) {
series([
function (next) {
- usersUtils.registerUser(server.url, 'user1', 'super password', done)
+ usersUtils.registerUser(server.url, 'user1', 'super password', next)
},
function (next) {
- usersUtils.registerUser(server.url, 'user2', 'super password', done)
+ usersUtils.registerUser(server.url, 'user2', 'super password', next)
},
function (next) {
- usersUtils.registerUser(server.url, 'user3', 'super password', done)
- },
-
- function (next) {
- usersUtils.registerUser(server.url, 'user4', 'super password', done)
+ usersUtils.registerUser(server.url, 'user3', 'super password', next)
}
], function (err) {
const data = res.body
- expect(data.signup.allowed).to.be.truthy
+ expect(data.signup.allowed).to.be.false
done()
})
expect(video.licenceLabel).to.equal('Attribution - Non Commercial')
expect(video.language).to.equal(9)
expect(video.languageLabel).to.equal('Japanese')
- expect(video.nsfw).to.be.truthy
+ expect(video.nsfw).to.be.ok
expect(video.description).to.equal('my super description for pod 1')
expect(video.podHost).to.equal('localhost:9001')
expect(video.magnetUri).to.exist
expect(video.licenceLabel).to.equal('Attribution - No Derivatives')
expect(video.language).to.equal(11)
expect(video.languageLabel).to.equal('German')
- expect(video.nsfw).to.be.falsy
+ expect(video.nsfw).to.be.true
expect(video.description).to.equal('my super description for pod 2')
expect(video.podHost).to.equal('localhost:9002')
expect(video.magnetUri).to.exist
expect(video1.licenceLabel).to.equal('Attribution - Non Commercial - Share Alike')
expect(video1.language).to.equal(11)
expect(video1.languageLabel).to.equal('German')
- expect(video1.nsfw).to.be.truthy
+ expect(video1.nsfw).to.be.ok
expect(video1.description).to.equal('my super description for pod 3')
expect(video1.podHost).to.equal('localhost:9003')
expect(video1.magnetUri).to.exist
expect(video2.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
expect(video2.language).to.equal(12)
expect(video2.languageLabel).to.equal('Korean')
- expect(video2.nsfw).to.be.falsy
+ expect(video2.nsfw).to.be.false
expect(video2.description).to.equal('my super description for pod 3-2')
expect(video2.podHost).to.equal('localhost:9003')
expect(video2.magnetUri).to.exist
expect(videoUpdated.licenceLabel).to.equal('Public Domain Dedication')
expect(videoUpdated.language).to.equal(13)
expect(videoUpdated.languageLabel).to.equal('French')
- expect(videoUpdated.nsfw).to.be.truthy
+ expect(videoUpdated.nsfw).to.be.ok
expect(videoUpdated.description).to.equal('my super description updated')
expect(videoUpdated.tags).to.deep.equal([ 'tagup1', 'tagup2' ])
expect(miscsUtils.dateIsValid(videoUpdated.updatedAt, 20000)).to.be.true
expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
expect(video.language).to.equal(3)
expect(video.languageLabel).to.equal('Mandarin')
- expect(video.nsfw).to.be.truthy
+ expect(video.nsfw).to.be.ok
expect(video.description).to.equal('my super description')
expect(video.podHost).to.equal('localhost:9001')
expect(video.magnetUri).to.exist
expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
expect(video.language).to.equal(3)
expect(video.languageLabel).to.equal('Mandarin')
- expect(video.nsfw).to.be.truthy
+ expect(video.nsfw).to.be.ok
expect(video.description).to.equal('my super description')
expect(video.podHost).to.equal('localhost:9001')
expect(video.magnetUri).to.exist
expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
expect(video.language).to.equal(3)
expect(video.languageLabel).to.equal('Mandarin')
- expect(video.nsfw).to.be.truthy
+ expect(video.nsfw).to.be.ok
expect(video.description).to.equal('my super description')
expect(video.podHost).to.equal('localhost:9001')
expect(video.author).to.equal('root')
expect(video.licenceLabel).to.equal('Attribution - Non Commercial - No Derivatives')
expect(video.language).to.equal(3)
expect(video.languageLabel).to.equal('Mandarin')
- expect(video.nsfw).to.be.truthy
+ expect(video.nsfw).to.be.ok
expect(video.description).to.equal('my super description')
expect(video.podHost).to.equal('localhost:9001')
expect(video.author).to.equal('root')
expect(video.licenceLabel).to.equal('Attribution - Share Alike')
expect(video.language).to.equal(5)
expect(video.languageLabel).to.equal('Arabic')
- expect(video.nsfw).to.be.truthy
+ expect(video.nsfw).to.be.ok
expect(video.description).to.equal('my super description updated')
expect(video.podHost).to.equal('localhost:9001')
expect(video.author).to.equal('root')
expect(video.licenceLabel).to.equal('Attribution - Share Alike')
expect(video.language).to.equal(5)
expect(video.languageLabel).to.equal('Arabic')
- expect(video.nsfw).to.be.truthy
+ expect(video.nsfw).to.be.ok
expect(video.description).to.equal('my super description updated')
expect(video.podHost).to.equal('localhost:9001')
expect(video.author).to.equal('root')
expect(video.licenceLabel).to.equal('Attribution - Share Alike')
expect(video.language).to.equal(5)
expect(video.languageLabel).to.equal('Arabic')
- expect(video.nsfw).to.be.truthy
+ expect(video.nsfw).to.be.ok
expect(video.description).to.equal('hello everybody')
expect(video.podHost).to.equal('localhost:9001')
expect(video.author).to.equal('root')
expect(user.username).to.equal('user_1')
expect(user.email).to.equal('user_1@example.com')
- expect(user.displayNSFW).to.be.falsy
+ expect(user.displayNSFW).to.be.false
expect(user.id).to.exist
done()
const user = users[0]
expect(user.username).to.equal('user_1')
expect(user.email).to.equal('user_1@example.com')
- expect(user.displayNSFW).to.be.falsy
+ expect(user.displayNSFW).to.be.false
const rootUser = users[1]
expect(rootUser.username).to.equal('root')
expect(rootUser.email).to.equal('admin1@example.com')
- expect(rootUser.displayNSFW).to.be.falsy
+ expect(rootUser.displayNSFW).to.be.false
userId = user.id
const user = users[0]
expect(user.username).to.equal('root')
expect(user.email).to.equal('admin1@example.com')
- expect(user.displayNSFW).to.be.falsy
+ expect(user.displayNSFW).to.be.false
done()
})
const user = users[0]
expect(user.username).to.equal('user_1')
expect(user.email).to.equal('user_1@example.com')
- expect(user.displayNSFW).to.be.falsy
+ expect(user.displayNSFW).to.be.false
done()
})
const user = users[0]
expect(user.username).to.equal('user_1')
expect(user.email).to.equal('user_1@example.com')
- expect(user.displayNSFW).to.be.falsy
+ expect(user.displayNSFW).to.be.false
done()
})
expect(users[0].username).to.equal('root')
expect(users[0].email).to.equal('admin1@example.com')
- expect(users[0].displayNSFW).to.be.falsy
+ expect(users[0].displayNSFW).to.be.false
expect(users[1].username).to.equal('user_1')
expect(users[1].email).to.equal('user_1@example.com')
- expect(users[1].displayNSFW).to.be.falsy
+ expect(users[1].displayNSFW).to.be.false
done()
})
expect(user.username).to.equal('user_1')
expect(user.email).to.equal('user_1@example.com')
- expect(user.displayNSFW).to.be.truthy
+ expect(user.displayNSFW).to.be.ok
expect(user.id).to.exist
done()