From cc7fd8387ef177449bf9d5b7c8fb4fcab8395389 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Tue, 14 Dec 2021 09:59:28 +0300 Subject: [PATCH] Update update-database.test.js --- tests/commands/update-database.test.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/commands/update-database.test.js b/tests/commands/update-database.test.js index 2506b354e..1a76932de 100644 --- a/tests/commands/update-database.test.js +++ b/tests/commands/update-database.test.js @@ -5,7 +5,7 @@ const { execSync } = require('child_process') beforeEach(() => { fs.rmdirSync('tests/__data__/temp', { recursive: true }) fs.mkdirSync('tests/__data__/temp') - fs.copyFileSync('tests/__data__/input/test.db', 'tests/__data__/temp/test.db') + fs.copyFileSync('tests/__data__/input/update.db', 'tests/__data__/temp/test.db') }) it('can update database', () => { @@ -94,4 +94,16 @@ it('can update database', () => { updated: true, cluster_id: 1 }) + expect(JSON.parse(lines[4])).toMatchObject({ + id: 'KayhanTV.af', + status: { label: 'Timeout', code: 'timeout', level: 4 }, + is_broken: true, + updated: true + }) + expect(JSON.parse(lines[5])).toMatchObject({ + id: 'Sharq.af', + status: { label: 'Offline', code: 'offline', level: 5 }, + is_broken: true, + updated: true + }) })