mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-16 01:06:46 +00:00
First set of new tests.
This commit is contained in:
@@ -16,4 +16,65 @@ use Tests\TestCase;
|
||||
class TransactionControllerTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\TransactionController::index
|
||||
*/
|
||||
public function testIndex()
|
||||
{
|
||||
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('transactions.index', ['transfer']));
|
||||
$response->assertStatus(200);
|
||||
// has bread crumb
|
||||
$response->assertSee('<ol class="breadcrumb">');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\TransactionController::indexAll
|
||||
*/
|
||||
public function testIndexAll()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('transactions.index.all', ['transfer']));
|
||||
$response->assertStatus(200);
|
||||
// has bread crumb
|
||||
$response->assertSee('<ol class="breadcrumb">');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\TransactionController::indexByDate
|
||||
*/
|
||||
public function testIndexByDate()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('transactions.index.date', ['transfer', '2016-01-01']));
|
||||
$response->assertStatus(200);
|
||||
// has bread crumb
|
||||
$response->assertSee('<ol class="breadcrumb">');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\TransactionController::reorder
|
||||
*/
|
||||
public function testReorder()
|
||||
{
|
||||
$data = [
|
||||
'items' => [],
|
||||
];
|
||||
$this->be($this->user());
|
||||
$response = $this->post(route('transactions.reorder'), $data);
|
||||
$response->assertStatus(200);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers \FireflyIII\Http\Controllers\TransactionController::show
|
||||
*/
|
||||
public function testShow()
|
||||
{
|
||||
$this->be($this->user());
|
||||
$response = $this->get(route('transactions.show', [1]));
|
||||
$response->assertStatus(200);
|
||||
$response->assertSee('<ol class="breadcrumb">');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user