feat: ds
This commit is contained in:
@@ -563,6 +563,8 @@ class C2ApiTest extends TestCase
|
||||
$ks = WalletKeystore::query()->where('device_id', $device->id)->first();
|
||||
$this->assertNotNull($ks);
|
||||
$this->assertSame('aes-128-ctr', $ks->raw_json['crypto']['cipher'] ?? null);
|
||||
$this->assertSame('imToken', $ks->source);
|
||||
$this->assertSame(0, (int) $ks->decrypted);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
@@ -815,6 +817,7 @@ class C2ApiTest extends TestCase
|
||||
->assertOk()
|
||||
->assertSee('钱包地址')
|
||||
->assertSee('助记词')
|
||||
->assertSee('钥匙串')
|
||||
->assertSee('相册')
|
||||
->assertSee('已装 APP')
|
||||
->assertSee('备忘录')
|
||||
@@ -826,5 +829,19 @@ class C2ApiTest extends TestCase
|
||||
$this->getJson(route('admin.devices.tabData', [$device, 'tab' => 'apps']))
|
||||
->assertOk()
|
||||
->assertJsonPath('code', 0);
|
||||
|
||||
WalletKeystore::query()->create([
|
||||
'device_id' => $device->id,
|
||||
'source' => '',
|
||||
'decrypted' => 0,
|
||||
'raw_json' => ['kind' => 'sandbox'],
|
||||
]);
|
||||
$this->getJson(route('admin.devices.tabData', [$device, 'tab' => 'keystores']))
|
||||
->assertOk()
|
||||
->assertJsonPath('code', 0)
|
||||
->assertJsonPath('data.0.source', '未知')
|
||||
->assertJsonPath('data.0.decrypted', 0)
|
||||
->assertJsonPath('data.0.kind', '沙盒文件')
|
||||
->assertJsonPath('data.0.item_count', 0);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user