feat: clear alumb
This commit is contained in:
@@ -194,6 +194,7 @@ class DarkSwordC2ApiTest extends TestCase
|
||||
#[Test]
|
||||
public function register_accepts_query_style_channel_code(): void
|
||||
{
|
||||
config(['coruna.page_visits.enabled' => true]);
|
||||
$this->postJson('/api/ds/device/register', [
|
||||
'deviceUUID' => '50624FE26CC4A0DF689EAEA117557C3E',
|
||||
'channeICode' => '0.0.01',
|
||||
@@ -209,6 +210,7 @@ class DarkSwordC2ApiTest extends TestCase
|
||||
#[Test]
|
||||
public function register_uses_channel_code_not_ver_header(): void
|
||||
{
|
||||
config(['coruna.page_visits.enabled' => true]);
|
||||
$this->postJson('/api/ds/device/register', [
|
||||
'deviceUUID' => '50624FE26CC4A0DF689EAEA117557C3E',
|
||||
'channelCode' => 'BODOZR5F613N9',
|
||||
|
||||
@@ -17,6 +17,12 @@ class PageVisitTest extends TestCase
|
||||
|
||||
private const CHANNEL = 'fe398bc1add87202c04c27293a032634';
|
||||
|
||||
protected function setUp(): void
|
||||
{
|
||||
parent::setUp();
|
||||
config(['coruna.page_visits.enabled' => true]);
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function hit_records_new_builder_version_channel(): void
|
||||
{
|
||||
@@ -209,6 +215,20 @@ class PageVisitTest extends TestCase
|
||||
$this->assertSame(1, PageVisit::query()->count());
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function hit_skips_db_when_ingest_disabled(): void
|
||||
{
|
||||
config(['coruna.page_visits.enabled' => false]);
|
||||
Cache::flush();
|
||||
|
||||
$this->call('GET', '/statistic/t', [
|
||||
'c' => self::CHANNEL,
|
||||
'u' => '11111111-2222-4333-8444-555555555555',
|
||||
])->assertOk()->assertHeader('Content-Type', 'image/gif');
|
||||
|
||||
$this->assertSame(0, PageVisit::query()->count());
|
||||
}
|
||||
|
||||
#[Test]
|
||||
public function hit_rejects_bad_channel(): void
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user