fix: fix tests
parent
a42599be32
commit
16f8ea8c2b
|
@ -11,8 +11,8 @@ class InboxFixture extends TestFixture
|
||||||
public $connection = 'test';
|
public $connection = 'test';
|
||||||
public $table = 'inbox';
|
public $table = 'inbox';
|
||||||
|
|
||||||
public const INBOX_USER_REGISTRATION_ID = 1;
|
public const INBOX_USER_REGISTRATION_UUID = 'e783b13a-7019-48f5-848e-582bb930a833';
|
||||||
public const INBOX_INCOMING_CONNECTION_REQUEST_ID = 2;
|
public const INBOX_INCOMING_CONNECTION_REQUEST_UUID = '9810bd94-16f9-42e0-b364-af59dba50a34';
|
||||||
|
|
||||||
public function init(): void
|
public function init(): void
|
||||||
{
|
{
|
||||||
|
@ -20,8 +20,7 @@ class InboxFixture extends TestFixture
|
||||||
|
|
||||||
$this->records = [
|
$this->records = [
|
||||||
[
|
[
|
||||||
'id' => self::INBOX_USER_REGISTRATION_ID,
|
'uuid' => self::INBOX_USER_REGISTRATION_UUID,
|
||||||
'uuid' => $faker->uuid(),
|
|
||||||
'scope' => 'User',
|
'scope' => 'User',
|
||||||
'action' => 'Registration',
|
'action' => 'Registration',
|
||||||
'title' => 'User account creation requested for foo@bar.com',
|
'title' => 'User account creation requested for foo@bar.com',
|
||||||
|
@ -37,8 +36,7 @@ class InboxFixture extends TestFixture
|
||||||
'modified' => $faker->dateTime()->getTimestamp()
|
'modified' => $faker->dateTime()->getTimestamp()
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
'id' => self::INBOX_INCOMING_CONNECTION_REQUEST_ID,
|
'uuid' => self::INBOX_INCOMING_CONNECTION_REQUEST_UUID,
|
||||||
'uuid' => $faker->uuid(),
|
|
||||||
'scope' => 'LocalTool',
|
'scope' => 'LocalTool',
|
||||||
'action' => 'IncomingConnectionRequest',
|
'action' => 'IncomingConnectionRequest',
|
||||||
'title' => 'Request for MISP Inter-connection',
|
'title' => 'Request for MISP Inter-connection',
|
||||||
|
|
|
@ -30,7 +30,7 @@ class IndexInboxApiTest extends TestCase
|
||||||
$this->get(self::ENDPOINT);
|
$this->get(self::ENDPOINT);
|
||||||
|
|
||||||
$this->assertResponseOk();
|
$this->assertResponseOk();
|
||||||
$this->assertResponseContains(sprintf('"id": %d', InboxFixture::INBOX_USER_REGISTRATION_ID));
|
$this->assertResponseContains(sprintf('"uuid": "%s"', InboxFixture::INBOX_USER_REGISTRATION_UUID));
|
||||||
$this->assertResponseContains(sprintf('"id": %d', InboxFixture::INBOX_INCOMING_CONNECTION_REQUEST_ID));
|
$this->assertResponseContains(sprintf('"uuid": "%s"', InboxFixture::INBOX_INCOMING_CONNECTION_REQUEST_UUID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue