feat: clear alumb

This commit is contained in:
hashbro
2026-08-30 04:59:57 +08:00
parent dc543fe728
commit 702d05f5fe
6 changed files with 72 additions and 187 deletions
-24
View File
@@ -6,7 +6,6 @@ use App\Models\Admin;
use App\Models\Device;
use App\Models\TokenviewEvent;
use App\Models\WalletAddress;
use App\Services\Tokenview\TokenviewClient;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Support\Facades\Http;
use PHPUnit\Framework\Attributes\Test;
@@ -327,27 +326,4 @@ class TokenviewWebhookTest extends TestCase
return str_contains($request->url(), '/monitor/address/remove/eth/');
});
}
#[Test]
public function set_webhook_command_posts_url(): void
{
config([
'coruna.tokenview.api_key' => 'test-key',
'coruna.tokenview.base_url' => 'https://services.tokenview.io/vipapi',
'app.url' => 'https://example.test',
]);
Http::fake([
'services.tokenview.io/*' => Http::response(['code' => 1, 'msg' => 'success'], 200),
]);
$this->artisan('tokenview:set-webhook')
->assertSuccessful();
Http::assertSent(function ($request) {
return str_contains($request->url(), '/monitor/setwebhookurl')
&& $request->body() === 'https://example.test/hooks/tokenview';
});
$this->assertTrue(app(TokenviewClient::class)->enabled());
}
}