Fix tests
This commit is contained in:
parent
bfcef50db9
commit
9ee92651f6
3 changed files with 2 additions and 2 deletions
|
@ -161,6 +161,7 @@ async function updateCustomConfig (req: express.Request, res: express.Response,
|
||||||
// camelCase to snake_case key
|
// camelCase to snake_case key
|
||||||
const toUpdateJSON = omit(toUpdate, 'user.videoQuota', 'instance.defaultClientRoute', 'instance.shortDescription', 'cache.videoCaptions')
|
const toUpdateJSON = omit(toUpdate, 'user.videoQuota', 'instance.defaultClientRoute', 'instance.shortDescription', 'cache.videoCaptions')
|
||||||
toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota
|
toUpdateJSON.user['video_quota'] = toUpdate.user.videoQuota
|
||||||
|
toUpdateJSON.user['video_quota_daily'] = toUpdate.user.videoQuotaDaily
|
||||||
toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute
|
toUpdateJSON.instance['default_client_route'] = toUpdate.instance.defaultClientRoute
|
||||||
toUpdateJSON.instance['short_description'] = toUpdate.instance.shortDescription
|
toUpdateJSON.instance['short_description'] = toUpdate.instance.shortDescription
|
||||||
toUpdateJSON.instance['default_nsfw_policy'] = toUpdate.instance.defaultNSFWPolicy
|
toUpdateJSON.instance['default_nsfw_policy'] = toUpdate.instance.defaultNSFWPolicy
|
||||||
|
|
|
@ -23,7 +23,6 @@ function getClient (clientId: string, clientSecret: string) {
|
||||||
function getRefreshToken (refreshToken: string) {
|
function getRefreshToken (refreshToken: string) {
|
||||||
logger.debug('Getting RefreshToken (refreshToken: ' + refreshToken + ').')
|
logger.debug('Getting RefreshToken (refreshToken: ' + refreshToken + ').')
|
||||||
|
|
||||||
|
|
||||||
return OAuthTokenModel.getByRefreshTokenAndPopulateClient(refreshToken)
|
return OAuthTokenModel.getByRefreshTokenAndPopulateClient(refreshToken)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,7 @@ function checkInitialConfig (data: CustomConfig) {
|
||||||
expect(data.signup.limit).to.equal(4)
|
expect(data.signup.limit).to.equal(4)
|
||||||
expect(data.admin.email).to.equal('admin1@example.com')
|
expect(data.admin.email).to.equal('admin1@example.com')
|
||||||
expect(data.user.videoQuota).to.equal(5242880)
|
expect(data.user.videoQuota).to.equal(5242880)
|
||||||
expect(data.user.videoQuotaDaily).to.equal(318742)
|
expect(data.user.videoQuotaDaily).to.equal(-1)
|
||||||
expect(data.transcoding.enabled).to.be.false
|
expect(data.transcoding.enabled).to.be.false
|
||||||
expect(data.transcoding.threads).to.equal(2)
|
expect(data.transcoding.threads).to.equal(2)
|
||||||
expect(data.transcoding.resolutions['240p']).to.be.true
|
expect(data.transcoding.resolutions['240p']).to.be.true
|
||||||
|
|
Loading…
Reference in a new issue