More test data, more tests.

This commit is contained in:
James Cole
2016-01-20 09:31:24 +01:00
parent 2faf84780f
commit 80cbc35c89
4 changed files with 191 additions and 25 deletions

View File

@@ -99,18 +99,25 @@ class AccountControllerTest extends TestCase
$this->assertEquals(302, $response->status());
$this->assertSessionHas('success');
$this->markTestIncomplete();
}
/**
* @covers FireflyIII\Http\Controllers\AccountController::update
* @todo Implement testUpdate().
*/
public function testUpdate()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->session(['accounts.edit.url' => 'http://localhost']);
$args = [
'id' => 1,
'name' => 'TestData new name',
'active' => 1,
'_token' => Session ::token(),
];
$this->be($this->user());
$response = $this->call('POST', '/accounts/update/1', $args);
$this->assertEquals(302, $response->status());
$this->assertSessionHas('success');
}
}

View File

@@ -15,13 +15,11 @@ class ChartPiggyBankControllerTest extends TestCase
/**
* @covers FireflyIII\Http\Controllers\Chart\PiggyBankController::history
* @todo Implement testHistory().
*/
public function testHistory()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
$this->be($this->user());
$response = $this->call('GET', '/chart/piggy-bank/1');
$this->assertEquals(200, $response->status());
}
}

View File

@@ -14,25 +14,23 @@ class ChartReportControllerTest extends TestCase
{
/**
* @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOut
* @todo Implement testYearInOut().
*/
public function testYearInOut()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
// $this->be($this->user());
// $response = $this->call('GET', '/chart/report/in-out/default/20150101/20151231/1');
// $this->assertEquals(200, $response->status());
$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
}
/**
* @covers FireflyIII\Http\Controllers\Chart\ReportController::yearInOutSummarized
* @todo Implement testYearInOutSummarized().
*/
public function testYearInOutSummarized()
{
// Remove the following lines when you implement this test.
$this->markTestIncomplete(
'This test has not been implemented yet.'
);
// $this->be($this->user());
// $response = $this->call('GET', '/chart/report/in-out-sum/default/20150101/20151231/1');
// $this->assertEquals(200, $response->status());
$this->markTestSkipped('Skipped because sqlite does not support DATE_FORMAT.');
}
}