mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-25 06:51:08 +00:00
Disable all kinds of tests until upgrades are complete.
This commit is contained in:
@@ -92,9 +92,9 @@ class CreateControllerTest extends TestCase
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
'title' => 'hello' . random_int(1, 100000),
|
||||
'first_date' => $tomorrow->format('Y-m-d'),
|
||||
'repetition_type' => 'daily',
|
||||
@@ -136,7 +136,7 @@ class CreateControllerTest extends TestCase
|
||||
* @covers \FireflyIII\Http\Controllers\Recurring\CreateController
|
||||
* @covers \FireflyIII\Http\Requests\RecurrenceFormRequest
|
||||
*/
|
||||
public function testStoreYearly(): void
|
||||
public function testStoreDeposit(): void
|
||||
{
|
||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||
@@ -147,12 +147,13 @@ class CreateControllerTest extends TestCase
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
'title' => 'hello' . random_int(1, 100000),
|
||||
'first_date' => $tomorrow->format('Y-m-d'),
|
||||
'repetition_type' => 'yearly,2018-01-01',
|
||||
'repetition_type' => 'daily',
|
||||
'skip' => 0,
|
||||
'recurring_description' => 'Some descr' . random_int(1, 100000),
|
||||
'active' => '1',
|
||||
@@ -162,12 +163,14 @@ class CreateControllerTest extends TestCase
|
||||
|
||||
// mandatory for transaction:
|
||||
'transaction_description' => 'Some descr',
|
||||
'transaction_type' => 'withdrawal',
|
||||
'transaction_type' => 'deposit',
|
||||
'transaction_currency_id' => '1',
|
||||
'amount' => '30',
|
||||
|
||||
// mandatory account info:
|
||||
'source_id' => '1',
|
||||
'source_id' => '2',
|
||||
'source_name' => 'Some source',
|
||||
'destination_id' => '1',
|
||||
'destination_name' => 'Some Expense',
|
||||
|
||||
// optional fields:
|
||||
@@ -202,9 +205,9 @@ class CreateControllerTest extends TestCase
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
'title' => 'hello' . random_int(1, 100000),
|
||||
'first_date' => $tomorrow->format('Y-m-d'),
|
||||
'repetition_type' => 'monthly,5',
|
||||
@@ -257,9 +260,9 @@ class CreateControllerTest extends TestCase
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
'title' => 'hello' . random_int(1, 100000),
|
||||
'first_date' => $tomorrow->format('Y-m-d'),
|
||||
'repetition_type' => 'ndom,3,5',
|
||||
@@ -297,64 +300,6 @@ class CreateControllerTest extends TestCase
|
||||
$response->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Recurring\CreateController
|
||||
* @covers \FireflyIII\Http\Requests\RecurrenceFormRequest
|
||||
*/
|
||||
public function testStoreDeposit(): void
|
||||
{
|
||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||
|
||||
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
'title' => 'hello' . random_int(1, 100000),
|
||||
'first_date' => $tomorrow->format('Y-m-d'),
|
||||
'repetition_type' => 'daily',
|
||||
'skip' => 0,
|
||||
'recurring_description' => 'Some descr' . random_int(1, 100000),
|
||||
'active' => '1',
|
||||
'apply_rules' => '1',
|
||||
'foreign_amount' => '1',
|
||||
'foreign_currency_id' => '2',
|
||||
|
||||
// mandatory for transaction:
|
||||
'transaction_description' => 'Some descr',
|
||||
'transaction_type' => 'deposit',
|
||||
'transaction_currency_id' => '1',
|
||||
'amount' => '30',
|
||||
|
||||
// mandatory account info:
|
||||
'source_id' => '2',
|
||||
'source_name' => 'Some source',
|
||||
'destination_id' => '1',
|
||||
'destination_name' => 'Some Expense',
|
||||
|
||||
// optional fields:
|
||||
'budget_id' => '1',
|
||||
'category' => 'CategoryA',
|
||||
'tags' => 'A,B,C',
|
||||
'create_another' => '1',
|
||||
'repetition_end' => 'times',
|
||||
'repetitions' => 3,
|
||||
];
|
||||
|
||||
$recurringRepos->shouldReceive('store')->andReturn($recurrence)->once();
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('recurring.store'), $data);
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Recurring\CreateController
|
||||
* @covers \FireflyIII\Http\Requests\RecurrenceFormRequest
|
||||
@@ -371,9 +316,9 @@ class CreateControllerTest extends TestCase
|
||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||
|
||||
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
'title' => 'hello' . random_int(1, 100000),
|
||||
'first_date' => $tomorrow->format('Y-m-d'),
|
||||
'repetition_type' => 'daily',
|
||||
@@ -429,9 +374,9 @@ class CreateControllerTest extends TestCase
|
||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||
|
||||
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
'title' => 'hello' . random_int(1, 100000),
|
||||
'first_date' => $tomorrow->format('Y-m-d'),
|
||||
'repetition_type' => 'daily',
|
||||
@@ -468,4 +413,59 @@ class CreateControllerTest extends TestCase
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\Recurring\CreateController
|
||||
* @covers \FireflyIII\Http\Requests\RecurrenceFormRequest
|
||||
*/
|
||||
public function testStoreYearly(): void
|
||||
{
|
||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||
$budgetRepos = $this->mock(BudgetRepositoryInterface::class);
|
||||
$categoryRepos = $this->mock(CategoryRepositoryInterface::class);
|
||||
$currencyRepos = $this->mock(CurrencyRepositoryInterface::class);
|
||||
$recurringRepos = $this->mock(RecurringRepositoryInterface::class);
|
||||
$userRepos = $this->mock(UserRepositoryInterface::class);
|
||||
$accountRepos = $this->mock(AccountRepositoryInterface::class);
|
||||
$piggyRepos = $this->mock(PiggyBankRepositoryInterface::class);
|
||||
|
||||
$tomorrow = Carbon::now()->addDays(2);
|
||||
$recurrence = $this->user()->recurrences()->first();
|
||||
$data = [
|
||||
'title' => 'hello' . random_int(1, 100000),
|
||||
'first_date' => $tomorrow->format('Y-m-d'),
|
||||
'repetition_type' => 'yearly,2018-01-01',
|
||||
'skip' => 0,
|
||||
'recurring_description' => 'Some descr' . random_int(1, 100000),
|
||||
'active' => '1',
|
||||
'apply_rules' => '1',
|
||||
'foreign_amount' => '1',
|
||||
'foreign_currency_id' => '2',
|
||||
|
||||
// mandatory for transaction:
|
||||
'transaction_description' => 'Some descr',
|
||||
'transaction_type' => 'withdrawal',
|
||||
'transaction_currency_id' => '1',
|
||||
'amount' => '30',
|
||||
|
||||
// mandatory account info:
|
||||
'source_id' => '1',
|
||||
'destination_name' => 'Some Expense',
|
||||
|
||||
// optional fields:
|
||||
'budget_id' => '1',
|
||||
'category' => 'CategoryA',
|
||||
'tags' => 'A,B,C',
|
||||
'create_another' => '1',
|
||||
'repetition_end' => 'times',
|
||||
'repetitions' => 3,
|
||||
];
|
||||
|
||||
$recurringRepos->shouldReceive('store')->andReturn($recurrence)->once();
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('recurring.store'), $data);
|
||||
$response->assertStatus(302);
|
||||
$response->assertSessionHas('success');
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user