This commit is contained in:
2026-11-02 20:27:11 +02:00
parent b44378b899
commit badaada043
300 changed files with 17458 additions and 1056 deletions
+5 -3
View File
@@ -206,10 +206,12 @@ test('financial role is reloaded after the company lock rather than trusting a s
expect(ExternalPayment::query()->count())->toBe(0);
});
test('payables trial stays unavailable outside its isolated database even with a source configured', function () {
config(['common-payables.source_instance' => 'synthetic-source']);
test('payables trial never inherits financial authority and only activates automatically in isolated PostgreSQL', function () {
config(['common-payables.enabled' => false, 'common-payables.source_instance' => 'synthetic-source']);
expect(SupplierPayables::enabled())->toBeFalse();
// paymentFixture rejects PostgreSQL databases outside the disposable test namespace.
// The same source alone keeps the module disabled on the normal SQLite suite.
expect(SupplierPayables::enabled())->toBe(DB::getDriverName() === 'pgsql');
$this->get('/obrigacoes-fornecedores')->assertForbidden();
$this->getJson('/api/supplier-payables')->assertForbidden();
$this->postJson('/api/supplier-payables/prepare', ['id' => $this->f['invoice']->id, 'reason' => 'Ensaio isolado'])->assertForbidden();