🤖 Auto commit for release 'develop' on 2025-08-29

This commit is contained in:
JC5
2025-08-29 07:23:32 +02:00
parent 2e4df28288
commit 1b0e16b6a5
16 changed files with 310 additions and 303 deletions

View File

@@ -47,17 +47,17 @@ final class RecurrenceControllerTest extends TestCase
{
for ($i = 1; $i <= $count; ++$i) {
$recurrence = Recurrence::create([
'user_id' => $user->id,
'user_group_id' => $user->user_group_id,
'transaction_type_id' => 1,
'title' => 'Recurrence ' . $i,
'description' => 'Recurrence ' . $i,
'first_date' => today(),
'apply_rules' => 1,
'active' => 1,
'repetitions' => 5,
'user_id' => $user->id,
'user_group_id' => $user->user_group_id,
'transaction_type_id' => 1,
'title' => 'Recurrence '.$i,
'description' => 'Recurrence '.$i,
'first_date' => today(),
'apply_rules' => 1,
'active' => 1,
'repetitions' => 5,
]);
]);
}
}
@@ -73,7 +73,7 @@ final class RecurrenceControllerTest extends TestCase
public function testAuthenticatedCall(): void
{
// act as a user
$user = $this->createAuthenticatedUser();
$user = $this->createAuthenticatedUser();
$this->actingAs($user);
$response = $this->get(route('api.v1.autocomplete.recurring'), ['Accept' => 'application/json']);
@@ -83,7 +83,7 @@ final class RecurrenceControllerTest extends TestCase
public function testGivenAuthenticatedRequestWithItems(): void
{
$user = $this->createAuthenticatedUser();
$user = $this->createAuthenticatedUser();
$this->actingAs($user);
$this->createTestRecurrences(5, $user);
@@ -93,50 +93,50 @@ final class RecurrenceControllerTest extends TestCase
$response->assertJsonCount(5);
$response->assertJsonFragment(['name' => 'Recurrence 1']);
$response->assertJsonStructure([
'*' => [
'id',
'name',
'active',
],
]);
'*' => [
'id',
'name',
'active',
],
]);
}
public function testGivenAuthenticatedRequestWithItemsLimited(): void
{
$user = $this->createAuthenticatedUser();
$user = $this->createAuthenticatedUser();
$this->actingAs($user);
$this->createTestRecurrences(5, $user);
$response = $this->get(route('api.v1.autocomplete.recurring', [
'query' => 'Recurrence',
'limit' => 3,
]), ['Accept' => 'application/json']);
]), ['Accept' => 'application/json']);
$response->assertStatus(200);
$response->assertHeader('Content-Type', 'application/json');
$response->assertJsonCount(3);
$response->assertJsonFragment(['name' => 'Recurrence 1']);
$response->assertJsonStructure([
'*' => [
'id',
'name',
'active',
],
]);
'*' => [
'id',
'name',
'active',
],
]);
}
public function testGivenAuthenticatedRequestWithItemsLots(): void
{
$user = $this->createAuthenticatedUser();
$user = $this->createAuthenticatedUser();
$this->actingAs($user);
$this->createTestRecurrences(20, $user);
$response = $this->get(route('api.v1.autocomplete.recurring', [
'query' => 'Recurrence 1',
'limit' => 20,
]), ['Accept' => 'application/json']);
]), ['Accept' => 'application/json']);
$response->assertStatus(200);
$response->assertHeader('Content-Type', 'application/json');