mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-15 19:22:08 -06:00
Tests for preferences controller.
This commit is contained in:
parent
037452e525
commit
8ef659f5de
@ -215,14 +215,14 @@ Route::group(
|
||||
|
||||
|
||||
// piggy bank controller
|
||||
Route::get('/piggy_banks', ['uses' => 'PiggybankController@index', 'as' => 'piggy_banks.index']);
|
||||
Route::get('/piggy_banks/add/{piggy_bank}', ['uses' => 'PiggybankController@add']); # add money
|
||||
Route::get('/piggy_banks/remove/{piggy_bank}', ['uses' => 'PiggybankController@remove']); #remove money
|
||||
Route::get('/piggy_banks', ['uses' => 'PiggyBankController@index', 'as' => 'piggy_banks.index']);
|
||||
Route::get('/piggy_banks/add/{piggy_bank}', ['uses' => 'PiggyBankController@add']); # add money
|
||||
Route::get('/piggy_banks/remove/{piggy_bank}', ['uses' => 'PiggyBankController@remove']); #remove money
|
||||
|
||||
Route::get('/piggy_banks/create', ['uses' => 'PiggybankController@create', 'as' => 'piggy_banks.create']);
|
||||
Route::get('/piggy_banks/edit/{piggy_bank}', ['uses' => 'PiggybankController@edit', 'as' => 'piggy_banks.edit']);
|
||||
Route::get('/piggy_banks/delete/{piggy_bank}', ['uses' => 'PiggybankController@delete', 'as' => 'piggy_banks.delete']);
|
||||
Route::get('/piggy_banks/show/{piggy_bank}', ['uses' => 'PiggybankController@show', 'as' => 'piggy_banks.show']);
|
||||
Route::get('/piggy_banks/create', ['uses' => 'PiggyBankController@create', 'as' => 'piggy_banks.create']);
|
||||
Route::get('/piggy_banks/edit/{piggy_bank}', ['uses' => 'PiggyBankController@edit', 'as' => 'piggy_banks.edit']);
|
||||
Route::get('/piggy_banks/delete/{piggy_bank}', ['uses' => 'PiggyBankController@delete', 'as' => 'piggy_banks.delete']);
|
||||
Route::get('/piggy_banks/show/{piggy_bank}', ['uses' => 'PiggyBankController@show', 'as' => 'piggy_banks.show']);
|
||||
|
||||
// preferences controller
|
||||
Route::get('/preferences', ['uses' => 'PreferencesController@index', 'as' => 'preferences']);
|
||||
@ -308,11 +308,11 @@ Route::group(
|
||||
Route::post('/currency/destroy/{currency}', ['uses' => 'CurrencyController@destroy', 'as' => 'currency.destroy']);
|
||||
|
||||
// piggy bank controller
|
||||
Route::post('/piggy_banks/store', ['uses' => 'PiggybankController@store', 'as' => 'piggy_banks.store']);
|
||||
Route::post('/piggy_banks/update/{piggy_bank}', ['uses' => 'PiggybankController@update', 'as' => 'piggy_banks.update']);
|
||||
Route::post('/piggy_banks/destroy/{piggy_bank}', ['uses' => 'PiggybankController@destroy', 'as' => 'piggy_banks.destroy']);
|
||||
Route::post('/piggy_banks/add/{piggy_bank}', ['uses' => 'PiggybankController@postAdd', 'as' => 'piggy_banks.add']); # add money
|
||||
Route::post('/piggy_banks/remove/{piggy_bank}', ['uses' => 'PiggybankController@postRemove', 'as' => 'piggy_banks.remove']); # remove money.
|
||||
Route::post('/piggy_banks/store', ['uses' => 'PiggyBankController@store', 'as' => 'piggy_banks.store']);
|
||||
Route::post('/piggy_banks/update/{piggy_bank}', ['uses' => 'PiggyBankController@update', 'as' => 'piggy_banks.update']);
|
||||
Route::post('/piggy_banks/destroy/{piggy_bank}', ['uses' => 'PiggyBankController@destroy', 'as' => 'piggy_banks.destroy']);
|
||||
Route::post('/piggy_banks/add/{piggy_bank}', ['uses' => 'PiggyBankController@postAdd', 'as' => 'piggy_banks.add']); # add money
|
||||
Route::post('/piggy_banks/remove/{piggy_bank}', ['uses' => 'PiggyBankController@postRemove', 'as' => 'piggy_banks.remove']); # remove money.
|
||||
|
||||
// repeated expense controller
|
||||
Route::post('/repeatedexpense/store', ['uses' => 'RepeatedExpenseController@store', 'as' => 'repeated.store']);
|
||||
|
@ -2,7 +2,7 @@
|
||||
@section('content')
|
||||
{{ Breadcrumbs::renderIfExists(Route::getCurrentRoute()->getName()) }}
|
||||
<!-- form -->
|
||||
{{Form::open(['class' => 'form-horizontal'])}}
|
||||
{{Form::open(['class' => 'form-horizontal','id' => 'preferences'])}}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-6">
|
||||
|
12
composer.lock
generated
12
composer.lock
generated
@ -1825,21 +1825,21 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "barryvdh/laravel-debugbar",
|
||||
"version": "v1.8.4",
|
||||
"version": "v1.8.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/barryvdh/laravel-debugbar.git",
|
||||
"reference": "410e98739c58ccd1b9ad2f49afd77a8d40144515"
|
||||
"reference": "548e12d45760ee66192029f4b642d2f4e3d64118"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/410e98739c58ccd1b9ad2f49afd77a8d40144515",
|
||||
"reference": "410e98739c58ccd1b9ad2f49afd77a8d40144515",
|
||||
"url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/548e12d45760ee66192029f4b642d2f4e3d64118",
|
||||
"reference": "548e12d45760ee66192029f4b642d2f4e3d64118",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"laravel/framework": "4.*|5.0.*",
|
||||
"maximebf/debugbar": "~1.10.1",
|
||||
"maximebf/debugbar": "~1.10.2",
|
||||
"php": ">=5.3.0",
|
||||
"symfony/finder": "~2.3"
|
||||
},
|
||||
@ -1875,7 +1875,7 @@
|
||||
"profiler",
|
||||
"webprofiler"
|
||||
],
|
||||
"time": "2014-12-04 12:14:32"
|
||||
"time": "2014-12-24 08:00:07"
|
||||
},
|
||||
{
|
||||
"name": "barryvdh/laravel-ide-helper",
|
||||
|
41
tests/functional/PreferencesControllerCest.php
Normal file
41
tests/functional/PreferencesControllerCest.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
|
||||
class PreferencesControllerCest
|
||||
{
|
||||
/**
|
||||
* @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 index(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('see my current set of preferences');
|
||||
$I->amOnPage('/preferences');
|
||||
$I->see('Preferences');
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FunctionalTester $I
|
||||
*/
|
||||
public function postIndex(FunctionalTester $I)
|
||||
{
|
||||
$I->wantTo('want to update my preferences');
|
||||
$I->amOnPage('/preferences');
|
||||
$I->see('Preferences');
|
||||
$I->submitForm('#preferences', []);
|
||||
$I->see('Preferences saved!');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user