First set of new tests.

This commit is contained in:
James Cole
2017-02-12 12:21:44 +01:00
parent 69bd292ed8
commit 018af62826
23 changed files with 2193 additions and 135 deletions

View File

@@ -16,4 +16,79 @@ use Tests\TestCase;
class ReportControllerTest extends TestCase
{
/**
* @covers \FireflyIII\Http\Controllers\ReportController::auditReport
*/
public function testAuditReport()
{
$this->be($this->user());
$response = $this->get(route('reports.report.audit', [1, '20160101', '20160131']));
$response->assertStatus(200);
$response->assertSee('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\ReportController::budgetReport
*/
public function testBudgetReport()
{
$this->be($this->user());
$response = $this->get(route('reports.report.budget', [1, 1, '20160101', '20160131']));
$response->assertStatus(200);
$response->assertSee('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\ReportController::categoryReport
*/
public function testCategoryReport()
{
$this->be($this->user());
$response = $this->get(route('reports.report.category', [1, 1, '20160101', '20160131']));
$response->assertStatus(200);
$response->assertSee('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\ReportController::defaultReport
*/
public function testDefaultReport()
{
$this->be($this->user());
$response = $this->get(route('reports.report.default', [1, '20160101', '20160131']));
$response->assertStatus(200);
$response->assertSee('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\ReportController::index
*/
public function testIndex()
{
$this->be($this->user());
$response = $this->get(route('reports.index'));
$response->assertStatus(200);
$response->assertSee('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\ReportController::options
*/
public function testOptions()
{
$this->be($this->user());
$response = $this->get(route('reports.options', ['default']));
$response->assertStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\ReportController::postIndex
*/
public function testPostIndex()
{
$this->be($this->user());
$response = $this->post(route('reports.index.post'));
$response->assertStatus(302);
}
}