mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-10-31 02:36:28 +00:00 
			
		
		
		
	🤖 Auto commit for release 'develop' on 2025-08-29
This commit is contained in:
		| @@ -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'); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user