mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-14 16:13:54 +00:00
Cover JSON controller.
This commit is contained in:
58
tests/functional/JsonControllerCest.php
Normal file
58
tests/functional/JsonControllerCest.php
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Created by PhpStorm.
|
||||||
|
* User: sander
|
||||||
|
* Date: 21/12/14
|
||||||
|
* Time: 18:05
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class JsonControllerCest
|
||||||
|
*/
|
||||||
|
class JsonControllerCest
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* @param FunctionalTester $I
|
||||||
|
*/
|
||||||
|
public function _after(FunctionalTester $I)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param FunctionalTester $I
|
||||||
|
*/
|
||||||
|
public function _before(FunctionalTester $I)
|
||||||
|
{
|
||||||
|
$I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param FunctionalTester $I
|
||||||
|
*/
|
||||||
|
public function categories(FunctionalTester $I)
|
||||||
|
{
|
||||||
|
$I->wantTo('See a JSON list of categories.');
|
||||||
|
$I->amOnPage('/json/categories');
|
||||||
|
$I->canSeeResponseCodeIs(200);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param FunctionalTester $I
|
||||||
|
*/
|
||||||
|
public function expenseAccounts(FunctionalTester $I)
|
||||||
|
{
|
||||||
|
$I->wantTo('See a JSON list of expense accounts.');
|
||||||
|
$I->amOnPage('/json/expense-accounts');
|
||||||
|
$I->canSeeResponseCodeIs(200);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param FunctionalTester $I
|
||||||
|
*/
|
||||||
|
public function revenueAccounts(FunctionalTester $I)
|
||||||
|
{
|
||||||
|
$I->wantTo('See a JSON list of revenue accounts.');
|
||||||
|
$I->amOnPage('/json/revenue-accounts');
|
||||||
|
$I->canSeeResponseCodeIs(200);
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user