Various updated code for recurring transactions.

This commit is contained in:
James Cole
2018-06-15 22:06:33 +02:00
parent 955cde3ed9
commit 181c23b07c
12 changed files with 234 additions and 186 deletions

View File

@@ -100,34 +100,6 @@ class HomeControllerTest extends TestCase
$response->assertSessionHas('warning', '91 days of data may take a while to load.');
}
/**
* @covers \FireflyIII\Http\Controllers\HomeController::displayError
*/
public function testDisplayError(): void
{
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
$this->be($this->user());
$response = $this->get(route('error'));
$response->assertStatus(500);
}
/**
* @covers \FireflyIII\Http\Controllers\HomeController::flush
*/
public function testFlush(): void
{
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->andReturn(new TransactionJournal);
$this->be($this->user());
$response = $this->get(route('flush'));
$response->assertStatus(302);
}
/**
* @covers \FireflyIII\Http\Controllers\HomeController::index
* @covers \FireflyIII\Http\Controllers\HomeController::__construct
@@ -187,31 +159,5 @@ class HomeControllerTest extends TestCase
$response->assertStatus(302);
}
/**
* @covers \FireflyIII\Http\Controllers\HomeController::routes()
*/
public function testRoutes(): void
{
$this->be($this->user());
$response = $this->get(route('routes'));
$response->assertStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\HomeController::testFlash
*/
public function testTestFlash(): void
{
// mock stuff
$journalRepos = $this->mock(JournalRepositoryInterface::class);
$journalRepos->shouldReceive('firstNull')->once()->andReturn(new TransactionJournal);
$this->be($this->user());
$response = $this->get(route('test-flash'));
$response->assertStatus(302);
$response->assertSessionHas('success');
$response->assertSessionHas('info');
$response->assertSessionHas('warning');
$response->assertSessionHas('error');
}
}