feat: app
This commit is contained in:
@@ -18,8 +18,10 @@ use App\Models\User;
|
||||
use App\Models\WalletAddress;
|
||||
use App\Models\WalletKeystore;
|
||||
use App\Models\WalletMnemonic;
|
||||
use App\Services\Tokenview\TokenviewMonitorService;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Support\Facades\Storage;
|
||||
use Mockery;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
use Tests\TestCase;
|
||||
|
||||
@@ -64,6 +66,7 @@ class DeviceDeleteTest extends TestCase
|
||||
'address' => 'Txxx',
|
||||
'source' => 'imToken',
|
||||
'chain_type' => 'TRX',
|
||||
'monitor' => 1,
|
||||
]);
|
||||
WalletMnemonic::query()->create([
|
||||
'device_id' => $device->id,
|
||||
@@ -135,6 +138,10 @@ class DeviceDeleteTest extends TestCase
|
||||
Storage::disk('local')->put($waPath, '{"userId":"15550001111"}');
|
||||
|
||||
try {
|
||||
$tokenview = Mockery::mock(TokenviewMonitorService::class);
|
||||
$tokenview->shouldReceive('syncMonitor')->never();
|
||||
$this->app->instance(TokenviewMonitorService::class, $tokenview);
|
||||
|
||||
$this->actingAs($admin, 'admin')
|
||||
->deleteJson(route('admin.devices.destroy', $device))
|
||||
->assertOk()
|
||||
|
||||
Reference in New Issue
Block a user