Reviewed all tests for Travis
This commit is contained in:
parent
e6560f88a6
commit
9e0cdec575
@ -73,18 +73,17 @@ class AccountsTest extends FeatureTestCase
|
||||
|
||||
private function getAccountRequest()
|
||||
{
|
||||
return[
|
||||
'company_id' => $this->company->id,
|
||||
'name' => $this->faker->text(5),
|
||||
'number' => '1',
|
||||
'currency_code' => setting('general.default_currency'),
|
||||
'opening_balance' => 0,
|
||||
'bank_name' => $this->faker->text(5),
|
||||
'bank_phone' => null,
|
||||
'bank_address' => null,
|
||||
'default_account' => $this->faker->randomElement(['yes', 'no']),
|
||||
'enabled' => $this->faker->boolean ? 1 : 0,
|
||||
return [
|
||||
'company_id' => $this->company->id,
|
||||
'name' => $this->faker->text(5),
|
||||
'number' => '1',
|
||||
'currency_code' => setting('general.default_currency'),
|
||||
'opening_balance' => 0,
|
||||
'bank_name' => $this->faker->text(5),
|
||||
'bank_phone' => null,
|
||||
'bank_address' => null,
|
||||
'default_account' => $this->faker->randomElement(['yes', 'no']),
|
||||
'enabled' => $this->faker->boolean ? 1 : 0,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
|
||||
namespace Tests\Feature\Banking;
|
||||
|
||||
use App\Models\Banking\Reconciliation;
|
||||
use Tests\Feature\FeatureTestCase;
|
||||
|
||||
|
@ -120,7 +120,7 @@ class TransfersTest extends FeatureTestCase
|
||||
'payment_method' => 'offlinepayment.cash.1',
|
||||
'reference' => null,
|
||||
'currency_code' => setting('general.default_currency'),
|
||||
'currency_rate' => '1',
|
||||
'currency_rate' => '1'
|
||||
];
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ class TransfersTest extends FeatureTestCase
|
||||
'category_id' => $this->company->categories()->type('income')->first()->id,
|
||||
'reference' => $this->faker->text(5),
|
||||
'payment_method' => setting('general.default_payment_method'),
|
||||
'attachment' => $attachment,
|
||||
'attachment' => $attachment
|
||||
];
|
||||
}
|
||||
|
||||
@ -160,7 +160,7 @@ class TransfersTest extends FeatureTestCase
|
||||
'category_id' => $this->company->categories()->type('expense')->first()->id,
|
||||
'payment_method' => setting('general.default_payment_method'),
|
||||
'reference' => $this->faker->text(5),
|
||||
'attachment' => $attachment,
|
||||
'attachment' => $attachment
|
||||
];
|
||||
}
|
||||
}
|
@ -50,7 +50,6 @@ class BillReminderTest extends FeatureTestCase
|
||||
|
||||
$items = [['name' => $this->faker->text(5), 'item_id' => null, 'quantity' => '1', 'price' => $amount, 'currency' => 'USD']];
|
||||
|
||||
|
||||
$data = [
|
||||
'vendor_id' => '0',
|
||||
'billed_at' => $this->faker->date(),
|
||||
@ -74,7 +73,6 @@ class BillReminderTest extends FeatureTestCase
|
||||
'company_id' => $this->company->id,
|
||||
];
|
||||
|
||||
|
||||
return $data;
|
||||
}
|
||||
}
|
||||
|
@ -50,7 +50,6 @@ class InvoiceReminderTest extends FeatureTestCase
|
||||
|
||||
$items = [['name' => $this->faker->text(5), 'item_id' => null, 'quantity' => '1', 'price' => $amount, 'currency' => 'USD']];
|
||||
|
||||
|
||||
$data = [
|
||||
'customer_id' => '0',
|
||||
'invoiced_at' => $this->faker->date(),
|
||||
|
@ -8,7 +8,6 @@ use Tests\Feature\FeatureTestCase;
|
||||
|
||||
class PaymentsTest extends FeatureTestCase
|
||||
{
|
||||
|
||||
public function testItShouldSeePaymentListPage()
|
||||
{
|
||||
$this->loginAs()
|
||||
@ -82,5 +81,4 @@ class PaymentsTest extends FeatureTestCase
|
||||
'attachment' => $attachment,
|
||||
];
|
||||
}
|
||||
|
||||
}
|
@ -80,7 +80,6 @@ class VendorsTest extends FeatureTestCase
|
||||
->assertRedirect(route('vendors.index'));
|
||||
|
||||
$this->assertFlashLevel('success');
|
||||
|
||||
}
|
||||
|
||||
private function getVendorRequest()
|
||||
@ -97,5 +96,4 @@ class VendorsTest extends FeatureTestCase
|
||||
'enabled' => $this->faker->boolean ? 1 : 0
|
||||
];
|
||||
}
|
||||
|
||||
}
|
@ -27,6 +27,11 @@ abstract class FeatureTestCase extends TestCase
|
||||
$this->faker = Factory::create();
|
||||
$this->user = User::first();
|
||||
$this->company = $this->user->first()->companies()->first();
|
||||
|
||||
// Set Company settings
|
||||
setting()->forgetAll();
|
||||
setting()->setExtraColumns(['company_id' => $this->company->id]);
|
||||
setting()->load(true);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -44,7 +49,7 @@ abstract class FeatureTestCase extends TestCase
|
||||
|
||||
if (!$company) {
|
||||
$company = $user->companies()->first();
|
||||
}
|
||||
}
|
||||
|
||||
$this->startSession();
|
||||
|
||||
|
@ -58,7 +58,6 @@ class InvoicesTest extends FeatureTestCase
|
||||
->assertStatus(302);
|
||||
|
||||
$this->assertFlashLevel('success');
|
||||
|
||||
}
|
||||
|
||||
public function testItShouldDeleteInvoice()
|
||||
@ -71,7 +70,6 @@ class InvoicesTest extends FeatureTestCase
|
||||
->assertRedirect(url('incomes/invoices'));
|
||||
|
||||
$this->assertFlashLevel('success');
|
||||
|
||||
}
|
||||
|
||||
private function getInvoiceRequest($recurring = 0)
|
||||
|
@ -7,7 +7,6 @@ use Tests\Feature\FeatureTestCase;
|
||||
|
||||
class CurrenciesTest extends FeatureTestCase
|
||||
{
|
||||
|
||||
public function testItShouldSeeCurrencyListPage()
|
||||
{
|
||||
$this->loginAs()
|
||||
@ -62,7 +61,6 @@ class CurrenciesTest extends FeatureTestCase
|
||||
$this->assertFlashLevel('success');
|
||||
}
|
||||
|
||||
|
||||
private function getCurrencyRequest()
|
||||
{
|
||||
return [
|
||||
|
Loading…
x
Reference in New Issue
Block a user