up
This commit is contained in:
@@ -1237,3 +1237,21 @@ test('истёкшая авторизация при подключении иг
|
||||
await assert.rejects(f.online.act({ action: 'connect', gameId: 7 }), /Сессия истекла/)
|
||||
assert.equal(f.online.snapshot().authenticated, false)
|
||||
})
|
||||
|
||||
test('некорректное серверное состояние отображает запрос и поле без содержимого ответа', async (t) => {
|
||||
const f = await fixture(t)
|
||||
await f.prepare()
|
||||
f.model.stateResponse = async () =>
|
||||
Response.json({
|
||||
state: {
|
||||
...f.model.remote,
|
||||
music: { playlist: { tracks: [{ ID: { password: 'SECRET' } }] } },
|
||||
},
|
||||
})
|
||||
await f.online.poll()
|
||||
const message = f.online.snapshot().error
|
||||
assert.match(message, /Состояние экрана · POST \/api\/screens\/state/)
|
||||
assert.ok(message.includes('state.music.playlist.tracks[0].ID'))
|
||||
assert.ok(message.includes('получено object'))
|
||||
assert.ok(!message.includes('SECRET'))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user