Increased test coverage. Also updated read me.

This commit is contained in:
James Cole 2014-12-21 17:59:47 +01:00
parent e62e0345df
commit 48cb528ae4
4 changed files with 86 additions and 15 deletions

View File

@ -3,6 +3,7 @@ Firefly III
[![Build Status](https://travis-ci.org/JC5/firefly-iii.svg?branch=develop)](https://travis-ci.org/JC5/firefly-iii)
[![Project Status](http://stillmaintained.com/JC5/firefly-iii.png?a=b)](http://stillmaintained.com/JC5/firefly-iii)
[![Coverage Status](https://coveralls.io/repos/JC5/firefly-iii/badge.png?branch=master)](https://coveralls.io/r/JC5/firefly-iii?branch=master)
[![Latest Stable Version](https://poser.pugx.org/grumpydictator/firefly-iii/v/stable.svg)](https://packagist.org/packages/grumpydictator/firefly-iii)
[![Total Downloads](https://poser.pugx.org/grumpydictator/firefly-iii/downloads.svg)](https://packagist.org/packages/grumpydictator/firefly-iii)
@ -25,7 +26,7 @@ laptop and [Firefly II](https://github.com/JC5/Firefly) is live.
- Predict and anticipate large expenses using "repeated expenses" (ie. yearly taxes);
- Predict and anticipate bills using "recurring transactions" (rent for example);
- View basic income / expense reports.
-
- Lots of help text in case you don't get it;
Everything is organised:
@ -39,15 +40,13 @@ Everything is organised:
Firefly III will feature, but does not feature yet:
- Financial reporting showing you how well you are doing;
- Lots of help text in case you don't get it;
- More control over other resources outside of personal finance
- Accounts shared with a partner (household accounts)
- Debts
- Credit cards
- More test-coverage (aka: actual test coverage);
- More test-coverage;
- Firefly will be able to split transactions; a single purchase can be split in multiple entries, for more fine-grained control.
- Firefly will be able to join transactions.
- Transfers and transactions are combined into one internal datatype which is more consistent with what you're actually doing: moving money from A to B. The fact that A or B or both are yours should not matter.
- Any other features I might not have thought of.
Some stuff has been removed:
@ -66,13 +65,9 @@ Some stuff has been removed:
![Reports](http://i.imgur.com/EnEIyQI.png)
## Current state
I have the basics up and running. Test coverage is currently non-existent.
I have the basics up and running. Test coverage is currently coming, slowly.
Although I have not checked extensively, some forms and views have CSRF vulnerabilities. This is because not all
views escape all characters by default. Will be fixed.
The current layout / look & feel is a pretty basic Bootstrap3 template. I am currently working on a more consistent,
expanded layout which will feature shiny AJAX things and data tables and all the Web 3.0 goodies you've come to expect
from social media sites.
Questions, ideas or other things to contribute? [Let me know](https://github.com/JC5/firefly-iii/issues/new)!
Questions, ideas or other things to contribute? [Let me know](https://github.com/JC5/firefly-iii/issues/new)!

View File

@ -77,7 +77,7 @@ class HomeController extends BaseController
Session::forget('range');
}
return Redirect::back();
return Redirect::intended('/');
}
/**
@ -87,7 +87,7 @@ class HomeController extends BaseController
{
Navigation::next();
return Redirect::back();
return Redirect::intended('/');
}
/**
@ -97,6 +97,6 @@ class HomeController extends BaseController
{
Navigation::prev();
return Redirect::back();
return Redirect::intended('/');
}
}

View File

@ -1,6 +1,7 @@
<?php
namespace FireflyIII\Shared\Toolkit;
use Carbon\Carbon;
use FireflyIII\Exception\FireflyException;
/**
@ -23,7 +24,7 @@ class Navigation
$filter = new Filter;
$range = $filter->setSessionRangeValue();
$start = \Session::get('start');
$start = \Session::get('start', Carbon::now()->startOfMonth());
/*
* Add some period to $start.
@ -50,7 +51,7 @@ class Navigation
$filter = new Filter;
$range = $filter->setSessionRangeValue();
$start = \Session::get('start');
$start = \Session::get('start', Carbon::now()->startOfMonth());
/*
* Substract some period to $start.

View File

@ -0,0 +1,75 @@
<?php
/**
* Class HomeControllerCest
*/
class HomeControllerCest
{
/**
* @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 flush(FunctionalTester $I)
{
$I->wantTo('flush the cache');
$I->amOnPage('/flush');
$I->canSeeResponseCodeIs(200);
$I->see('Firefly');
}
/**
* @param FunctionalTester $I
*/
public function index(FunctionalTester $I)
{
$I->wantTo('see the home page of Firefly');
$I->amOnPage('/');
$I->canSeeResponseCodeIs(200);
$I->see('Firefly');
}
/**
* @param FunctionalTester $I
*/
public function rangeJump(FunctionalTester $I)
{
$I->wantTo('switch to another date range');
$I->amOnPage('/jump/6M');
$I->canSeeResponseCodeIs(200);
}
/**
* @param FunctionalTester $I
*/
public function sessionNext(FunctionalTester $I)
{
$I->wantTo('jump to the next period');
$I->amOnPage('/next');
$I->canSeeResponseCodeIs(200);
}
/**
* @param FunctionalTester $I
*/
public function sessionPrev(FunctionalTester $I)
{
$I->wantTo('jump to the previous period');
$I->amOnPage('/prev');
$I->canSeeResponseCodeIs(200);
}
}