Files
firefly-iii/tests/acceptance/Controllers/JsonControllerTest.php
2016-12-18 10:37:59 +01:00

159 lines
4.0 KiB
PHP

<?php
/**
* JsonControllerTest.php
* Copyright (C) 2016 thegrumpydictator@gmail.com
*
* This software may be modified and distributed under the terms of the
* Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
/**
* Generated by PHPUnit_SkeletonGenerator on 2016-12-10 at 05:51:42.
*/
class JsonControllerTest extends TestCase
{
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
public function setUp()
{
parent::setUp();
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::action
*/
public function testAction()
{
$this->be($this->user());
$this->call('get', route('json.action'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::boxBillsPaid
*/
public function testBoxBillsPaid()
{
$this->be($this->user());
$this->call('get', route('json.box.paid'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::boxBillsUnpaid
*/
public function testBoxBillsUnpaid()
{
$this->be($this->user());
$this->call('get', route('json.box.unpaid'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::boxIn
*/
public function testBoxIn()
{
$this->be($this->user());
$this->call('get', route('json.box.in'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::boxOut
*/
public function testBoxOut()
{
$this->be($this->user());
$this->call('get', route('json.box.out'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::categories
*/
public function testCategories()
{
$this->be($this->user());
$this->call('get', route('json.categories'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::endTour
*/
public function testEndTour()
{
$this->be($this->user());
$this->call('post', route('json.end-tour'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::expenseAccounts
*/
public function testExpenseAccounts()
{
$this->be($this->user());
$this->call('get', route('json.expense-accounts'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::revenueAccounts
*/
public function testRevenueAccounts()
{
$this->be($this->user());
$this->call('get', route('json.revenue-accounts'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::tags
*/
public function testTags()
{
$this->be($this->user());
$this->call('get', route('json.tags'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::tour
*/
public function testTour()
{
$this->be($this->user());
$this->call('get', route('json.tour'));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::transactionJournals
*/
public function testTransactionJournals()
{
$this->be($this->user());
$this->call('get', route('json.transaction-journals', ['deposit']));
$this->assertResponseStatus(200);
}
/**
* @covers \FireflyIII\Http\Controllers\JsonController::trigger
*/
public function testTrigger()
{
$this->be($this->user());
$this->call('get', route('json.trigger'));
$this->assertResponseStatus(200);
}
}