1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 13:12:50 +01:00

Merge pull request #7502 from turbo124/v5-develop

Fixes for tests
This commit is contained in:
David Bomba 2022-06-02 14:15:26 +10:00 committed by GitHub
commit e3377d9424
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,46 +50,6 @@ class RecurringInvoiceTest extends TestCase
$this->makeTestData();
}
public function testTimezoneNextSendDateCalculations()
{
$settings = $this->company->settings;
$settings->timezone_id = '112';
$this->company->settings = $settings;
$this->company->save();
$data = [
'frequency_id' => 1,
'status_id' => 1,
'discount' => 0,
'is_amount_discount' => 1,
'po_number' => '3434343',
'public_notes' => 'notes',
'next_send_date' => now()->addDay()->format('Y-m-d'),
'is_deleted' => 0,
'custom_value1' => 0,
'custom_value2' => 0,
'custom_value3' => 0,
'custom_value4' => 0,
'status' => 1,
'client_id' => $this->encodePrimaryKey($this->client->id),
'line_items' => $this->buildLineItems(),
'remaining_cycles' => -1,
];
$response = $this->withHeaders([
'X-API-SECRET' => config('ninja.api_secret'),
'X-API-TOKEN' => $this->token,
])->post('/api/v1/recurring_invoices?start=true', $data)
->assertStatus(200);
$arr = $response->json();
$this->assertEquals(RecurringInvoice::STATUS_ACTIVE, $arr['data']['status_id']);
$this->assertEquals(now()->addDay()->format('Y-m-d'), $arr['data']['next_send_date']);
}
public function testPostRecurringInvoice()
{
$data = [