mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Merge branch 'main' into develop
This commit is contained in:
commit
2ef3a33fbf
15
.github/workflows/release.yml
vendored
15
.github/workflows/release.yml
vendored
@ -314,6 +314,7 @@ jobs:
|
||||
git push origin $releaseName
|
||||
gh release create $releaseName -p --verify-tag \
|
||||
-t "Development release for $(date +'%Y-%m-%d')" \
|
||||
--latest=false \
|
||||
-F output.txt
|
||||
fi
|
||||
|
||||
@ -327,6 +328,7 @@ jobs:
|
||||
git push origin $releaseName
|
||||
gh release create $releaseName -p --verify-tag \
|
||||
-t "Branch release for $(date +'%Y-%m-%d')" \
|
||||
--latest=false \
|
||||
-F output.txt
|
||||
fi
|
||||
|
||||
@ -352,7 +354,18 @@ jobs:
|
||||
echo 'MAIN (real) release'
|
||||
git tag -a $releaseName -m "Here be changelog"
|
||||
git push origin $releaseName
|
||||
gh release create $releaseName -F output.txt -t "$releaseName" --verify-tag
|
||||
|
||||
# do not tag as latest when alpha or beta.
|
||||
if [[ "$version" == *alpha* ]] || [[ "$version" == *beta* ]]; then
|
||||
echo 'Mark alpha or beta as NOT the latest.'
|
||||
gh release create $releaseName -F output.txt -t "$releaseName" --verify-tag --latest=false
|
||||
fi
|
||||
|
||||
# tag as latest when NOT alpha or beta.
|
||||
if [[ "$version" != *alpha* ]] && [[ "$version" != *beta* ]]; then
|
||||
echo 'Mark prod as the latest.'
|
||||
gh release create $releaseName -F output.txt -t "$releaseName" --verify-tag
|
||||
fi
|
||||
|
||||
# add archive files to release
|
||||
gh release upload $releaseName $zipName
|
||||
|
@ -397,6 +397,9 @@ class BudgetController extends Controller
|
||||
foreach ($journals as $journal) {
|
||||
$key = sprintf('%d-%d', $journal['destination_account_id'], $journal['currency_id']);
|
||||
$amount = $journal['amount'];
|
||||
$symbol = $journal['currency_symbol'];
|
||||
$code = $journal['currency_code'];
|
||||
$name = $journal['currency_name'];
|
||||
|
||||
// if convert to native, use the native things, unless it's the foreign amount which is in the native currency.
|
||||
if ($this->convertToNative && $journal['currency_id'] !== $this->defaultCurrency->id && $journal['foreign_currency_id'] !== $this->defaultCurrency->id) {
|
||||
|
@ -53,7 +53,11 @@ class PiggyBankRepository implements PiggyBankRepositoryInterface
|
||||
public function destroyAll(): void
|
||||
{
|
||||
Log::channel('audit')->info('Delete all piggy banks through destroyAll');
|
||||
$this->user->piggyBanks()->delete();
|
||||
|
||||
PiggyBank::leftJoin('account_piggy_bank', 'account_piggy_bank.piggy_bank_id', '=', 'piggy_banks.id')
|
||||
->leftJoin('accounts', 'accounts.id', '=', 'account_piggy_bank.account_id')
|
||||
->where('accounts.user_id', $this->user->id)
|
||||
->delete();
|
||||
}
|
||||
|
||||
public function findPiggyBank(?int $piggyBankId, ?string $piggyBankName): ?PiggyBank
|
||||
|
@ -100,7 +100,7 @@ final class CurrencyControllerTest extends TestCase
|
||||
$this->actingAs($user);
|
||||
|
||||
// create test data
|
||||
$this->createTestCurrencies(10, true);
|
||||
$this->createTestCurrencies(9, true);
|
||||
|
||||
// test API
|
||||
$response = $this->get(route('api.v1.autocomplete.currencies'), ['Accept' => 'application/json']);
|
||||
@ -134,7 +134,7 @@ final class CurrencyControllerTest extends TestCase
|
||||
$response = $this->get(route('api.v1.autocomplete.currencies'), ['Accept' => 'application/json']);
|
||||
$response->assertStatus(200);
|
||||
$response->assertHeader('Content-Type', 'application/json');
|
||||
$response->assertJsonCount(0);
|
||||
$response->assertJsonCount(1); // always connects to EUR.
|
||||
}
|
||||
|
||||
public function testGivenAuthenticatedRequestWhenCallingTheCurrenciesEndpointWithQueryThenReturnsCurrenciesWithLimit(): void
|
||||
|
@ -23,8 +23,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace Tests\integration;
|
||||
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use FireflyIII\Models\UserGroup;
|
||||
use FireflyIII\User;
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Illuminate\Foundation\Testing\TestCase as BaseTestCase;
|
||||
use Tests\integration\Traits\CollectsValues;
|
||||
|
||||
@ -35,8 +37,10 @@ abstract class TestCase extends BaseTestCase
|
||||
{
|
||||
use CollectsValues;
|
||||
use CreatesApplication;
|
||||
use RefreshDatabase;
|
||||
|
||||
protected const MAX_ITERATIONS = 2;
|
||||
protected $seed = true;
|
||||
|
||||
public function dateRangeProvider(): array
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user