mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-22 20:16:22 +00:00
Various code cleanup [skip ci]
This commit is contained in:
@@ -191,7 +191,6 @@ class BillControllerTest extends TestCase
|
||||
Amount::shouldReceive('getCurrencyCode')->andReturn('XX');
|
||||
|
||||
|
||||
|
||||
$this->call('GET', '/bills/show/' . $bill->id);
|
||||
}
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ class HelpControllerTest extends TestCase
|
||||
public function testGetHelpTextNoRoute()
|
||||
{
|
||||
// login
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
|
||||
$this->be($user);
|
||||
// mock some stuff.
|
||||
|
||||
@@ -210,7 +210,7 @@ class JsonControllerTest extends TestCase
|
||||
public function testTransactionJournals()
|
||||
{
|
||||
$journal = FactoryMuffin::create('FireflyIII\Models\TransactionJournal');
|
||||
$type = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||
$type = FactoryMuffin::create('FireflyIII\Models\TransactionType');
|
||||
$collection = new Collection([$journal]);
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$this->be($user);
|
||||
|
||||
@@ -6,6 +6,7 @@ use FireflyIII\Models\Preference;
|
||||
use FireflyIII\Models\TransactionCurrency;
|
||||
use Illuminate\Support\Collection;
|
||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||
|
||||
/**
|
||||
* Class PiggyBankControllerTest
|
||||
*/
|
||||
@@ -110,7 +111,7 @@ class PiggyBankControllerTest extends TestCase
|
||||
|
||||
public function testEdit()
|
||||
{
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
$piggyBank = FactoryMuffin::create('FireflyIII\Models\PiggyBank');
|
||||
$piggyBank->targetdate = Carbon::now()->addYear();
|
||||
$piggyBank->save();
|
||||
$this->be($piggyBank->account->user);
|
||||
|
||||
@@ -65,7 +65,7 @@ class PreferencesControllerTest extends TestCase
|
||||
|
||||
public function testPostIndex()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$this->be($user);
|
||||
|
||||
$data = [
|
||||
|
||||
@@ -59,7 +59,7 @@ class ReminderControllerTest extends TestCase
|
||||
|
||||
public function testIndex()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$this->be($user);
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
$collection = new Collection([$reminder]);
|
||||
@@ -77,7 +77,7 @@ class ReminderControllerTest extends TestCase
|
||||
|
||||
public function testShow()
|
||||
{
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
$reminder->notnow = false;
|
||||
$reminder->save();
|
||||
$this->be($reminder->remindersable->account->user);
|
||||
@@ -88,7 +88,7 @@ class ReminderControllerTest extends TestCase
|
||||
|
||||
public function testShowDismissed()
|
||||
{
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
$reminder = FactoryMuffin::create('FireflyIII\Models\Reminder');
|
||||
$reminder->notnow = true;
|
||||
$reminder->save();
|
||||
$this->be($reminder->remindersable->account->user);
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<?php
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Support\Collection;
|
||||
use League\FactoryMuffin\Facade as FactoryMuffin;
|
||||
|
||||
/**
|
||||
@@ -38,7 +36,8 @@ class SearchControllerTest extends TestCase
|
||||
parent::tearDown();
|
||||
}
|
||||
|
||||
public function testSearch() {
|
||||
public function testSearch()
|
||||
{
|
||||
$user = FactoryMuffin::create('FireflyIII\User');
|
||||
$this->be($user);
|
||||
$words = ['Something'];
|
||||
@@ -50,7 +49,7 @@ class SearchControllerTest extends TestCase
|
||||
$repository->shouldReceive('searchBudgets')->with($words)->once()->andReturn([]);
|
||||
$repository->shouldReceive('searchTags')->with($words)->once()->andReturn([]);
|
||||
|
||||
$this->call('GET','/search?q=Something');
|
||||
$this->call('GET', '/search?q=Something');
|
||||
$this->assertResponseOk();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user