Added some new tests.

This commit is contained in:
James Cole 2014-12-13 13:07:12 +01:00
parent 55740c0d97
commit d3cda8811d
3 changed files with 221 additions and 7 deletions

View File

@ -2,6 +2,9 @@
use Carbon\Carbon;
/**
* @SuppressWarnings("CamelCase")
* @SuppressWarnings("short")
*
* Class AccountControllerCest
*/
class AccountControllerCest
@ -20,10 +23,6 @@ class AccountControllerCest
{
$I->amLoggedAs(['email' => 'thegrumpydictator@gmail.com', 'password' => 'james']);
Session::put('start', new Carbon);
Session::put('end', new Carbon);
}
/**
@ -82,9 +81,9 @@ class AccountControllerCest
public function show(FunctionalTester $I)
{
$I->wantTo('see one account');
#$I->amOnPage('/accounts/show/3');
#$I->see('Details for');
#$I->see('Delete me');
$I->amOnPage('/accounts/show/3');
$I->see('Details for');
$I->see('Delete me');
}
/**

View File

@ -0,0 +1,119 @@
<?php
/**
* @SuppressWarnings("CamelCase")
* @SuppressWarnings("short")
*
* Class BudgetControllerCest
*/
class BudgetControllerCest
{
/**
* @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 amount(FunctionalTester $I)
{
$I->wantTo('update the amount for a budget and limit repetition');
$I->amOnPage('/budgets/income');
}
/**
* @param FunctionalTester $I
*/
public function create(FunctionalTester $I)
{
$I->wantTo('create a budget');
$I->amOnRoute('budgets.create');
}
/**
* @param FunctionalTester $I
*/
public function delete(FunctionalTester $I)
{
$I->wantTo('delete a budget');
$I->amOnPage('/budgets/delete/1');
}
/**
* @param FunctionalTester $I
*/
public function destroy(FunctionalTester $I)
{
$I->wantTo('destroy a budget');
}
/**
* @param FunctionalTester $I
*/
public function edit(FunctionalTester $I)
{
$I->wantTo('edit a budget');
$I->amOnPage('/budgets/edit/1');
}
/**
* @param FunctionalTester $I
*/
public function index(FunctionalTester $I)
{
$I->wantTo('show all budgets');
$I->amOnPage('/budgets');
}
/**
* @param FunctionalTester $I
*/
public function postUpdateIncome(FunctionalTester $I)
{
$I->wantTo('process the update to my monthly income');
}
/**
* @param FunctionalTester $I
*/
public function show(FunctionalTester $I)
{
$I->wantTo('show a budget');
$I->amOnPage('/budgets/show/1');
}
/**
* @param FunctionalTester $I
*/
public function store(FunctionalTester $I)
{
$I->wantTo('store a budget');
}
/**
* @param FunctionalTester $I
*/
public function update(FunctionalTester $I)
{
$I->wantTo('update a budget');
}
/**
* @param FunctionalTester $I
*/
public function updateIncome(FunctionalTester $I)
{
$I->wantTo('update my monthly income');
}
}

View File

@ -0,0 +1,96 @@
<?php
/**
* @SuppressWarnings("CamelCase")
* @SuppressWarnings("short")
*
* Class CategoryControllerCest
*/
class CategoryControllerCest
{
/**
* @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 create(FunctionalTester $I)
{
$I->wantTo('create a new category');
$I->amOnPage('/categories/create');
}
/**
* @param FunctionalTester $I
*/
public function delete(FunctionalTester $I)
{
$I->wantTo('delete a category');
$I->amOnPage('/categories/delete/1');
}
/**
* @param FunctionalTester $I
*/
public function destroy(FunctionalTester $I)
{
$I->wantTo('destroy a category');
}
/**
* @param FunctionalTester $I
*/
public function edit(FunctionalTester $I)
{
$I->wantTo('edit a category');
$I->amOnPage('/categories/edit/1');
}
/**
* @param FunctionalTester $I
*/
public function index(FunctionalTester $I)
{
$I->wantTo('show all categories');
$I->amOnPage('/categories');
}
/**
* @param FunctionalTester $I
*/
public function show(FunctionalTester $I)
{
$I->wantTo('show a category');
$I->amOnPage('/categories/delete/1');
}
/**
* @param FunctionalTester $I
*/
public function store(FunctionalTester $I)
{
$I->wantTo('store a category');
}
/**
* @param FunctionalTester $I
*/
public function update(FunctionalTester $I)
{
$I->wantTo('update a category');
}
}