@@ -59,12 +59,14 @@ test('bank revision does not hide a pending rejection but confirmation still rec
|
||||
$this->actingAs($this->f['issuer']);
|
||||
app(SupplierBankWorkflow::class)->propose($this->f['issuer'], $this->f['supplier'], [...$this->f['bank_data'], 'previous_id' => $this->f['bank']->id, 'account_identifier' => 'TEST-NEW-VERSION']);
|
||||
$this->actingAs($this->f['validator']);
|
||||
$this->get('/requisicoes/tarefas?module=finance')->assertInertia(fn (Assert $page) => $page->where('tasks.total', 1));
|
||||
$this->get('/requisicoes/tarefas?module=finance')->assertInertia(fn (Assert $page) => $page->where('tasks.total', 2)
|
||||
->where('tasks.data', fn ($items) => collect($items)->pluck('task')->sort()->values()->all() === ['payment_review', 'supplier_bank_review']));
|
||||
$data = ['decision' => 'confirmed', 'reason' => 'Conferência sintética', 'independently_verified' => true];
|
||||
$this->postJson('/pagamentos/'.$this->payment->id.'/conferir', $data)->assertUnprocessable();
|
||||
expect($this->payment->fresh()->status)->toBe('pending');
|
||||
$this->post('/pagamentos/'.$this->payment->id.'/conferir', [...$data, 'decision' => 'rejected'])->assertRedirect();
|
||||
$this->get('/requisicoes/tarefas?module=finance')->assertInertia(fn (Assert $page) => $page->where('tasks.total', 0));
|
||||
$this->get('/requisicoes/tarefas?module=finance')->assertInertia(fn (Assert $page) => $page->where('tasks.total', 1)
|
||||
->where('tasks.data.0.task', 'supplier_bank_review'));
|
||||
});
|
||||
|
||||
test('payment and invoice focus cannot cross companies', function () {
|
||||
|
||||
Reference in New Issue
Block a user