From 3f65d5d760616101eefc67857f4137a0fabf6479 Mon Sep 17 00:00:00 2001 From: James Cole Date: Sun, 21 Dec 2014 18:09:35 +0100 Subject: [PATCH] Cover JSON controller. --- tests/functional/JsonControllerCest.php | 58 +++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 tests/functional/JsonControllerCest.php diff --git a/tests/functional/JsonControllerCest.php b/tests/functional/JsonControllerCest.php new file mode 100644 index 0000000000..0f76e1fdd7 --- /dev/null +++ b/tests/functional/JsonControllerCest.php @@ -0,0 +1,58 @@ +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); + } +} \ No newline at end of file