mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fix some edge cases in recurrences.
This commit is contained in:
@@ -212,10 +212,10 @@ class UpdateControllerTest extends TestCase
|
||||
// now loop fields, enough to create sets I guess?
|
||||
// TODO maybe do some permutation stuff here?
|
||||
$extraTransaction = [
|
||||
'currency_id' => $faker->numberBetween(1, 4),
|
||||
'foreign_currency_id' => $faker->numberBetween(4, 6),
|
||||
'currency_id' => (string)$faker->numberBetween(1, 4),
|
||||
'foreign_currency_id' => (string)$faker->numberBetween(4, 6),
|
||||
'source_id' => $faker->numberBetween(1, 3),
|
||||
'destination_id' => $faker->numberBetween(8),
|
||||
'destination_id' => $faker->numberBetween(8, 8),
|
||||
'amount' => number_format($faker->randomFloat(2, 10, 100), 2),
|
||||
'foreign_amount' => number_format($faker->randomFloat(2, 10, 100), 2),
|
||||
'description' => $faker->uuid,
|
||||
|
||||
@@ -196,7 +196,7 @@ trait TestHelpers
|
||||
if (array_key_exists($rKey, $submissionArray)) {
|
||||
// comparison must be on array:
|
||||
if (is_array($submissionArray[$rKey]) && is_array($rValue)) {
|
||||
$this->compareArray($originalAttributes, $rKey, $submissionArray[$rKey], $rValue);
|
||||
$this->compareArray($submissionArray, $rKey, $submissionArray[$rKey], $rValue);
|
||||
}
|
||||
|
||||
if (!is_array($submissionArray[$rKey]) && !is_array($rValue)) {
|
||||
@@ -261,7 +261,7 @@ trait TestHelpers
|
||||
$responseBody = $response->content();
|
||||
$responseJson = json_decode($responseBody, true);
|
||||
$status = $response->getStatusCode();
|
||||
$this->assertEquals($status, 200, sprintf("Submission: %s\nResponse: %s", json_encode($submission), $responseBody));
|
||||
$this->assertEquals($status, 200, sprintf("Submission:\n%s\nResponse: %s", json_encode($submission), $responseBody));
|
||||
|
||||
$response->assertHeader('Content-Type', 'application/vnd.api+json');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user