mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-12-28 09:51:21 -06:00
Fixed transaction coverage.
This commit is contained in:
parent
fa1695672a
commit
05ea8216ff
@ -5,6 +5,8 @@ League\FactoryMuffin\Facade::define(
|
||||
'account_id' => 'factory|Account',
|
||||
'transaction_journal_id' => 'factory|TransactionJournal',
|
||||
'description' => 'sentence',
|
||||
'amount' => 'numberBetween:1,100',
|
||||
'amount' => function() {
|
||||
return round(rand(100,10000) / 100,2);
|
||||
}
|
||||
]
|
||||
);
|
||||
|
@ -40,7 +40,9 @@
|
||||
"sebastian/phpdcd": "*",
|
||||
"codeception/phpbuiltinserver": "*",
|
||||
"codeception/specify": "*",
|
||||
"codeception/verify": "*"
|
||||
"codeception/verify": "*",
|
||||
"fzaninotto/faker": "1.*"
|
||||
|
||||
|
||||
},
|
||||
"autoload": {
|
||||
|
2
composer.lock
generated
2
composer.lock
generated
@ -4,7 +4,7 @@
|
||||
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"hash": "66a93b738537ed20455648f477585c88",
|
||||
"hash": "3ac71ef711586f9c2bf7c36482284a13",
|
||||
"packages": [
|
||||
{
|
||||
"name": "classpreloader/classpreloader",
|
||||
|
@ -46,16 +46,15 @@ class TransactionTest extends TestCase
|
||||
{
|
||||
$transaction = f::create('Transaction');
|
||||
$amount = floatval($transaction->amount);
|
||||
$amount--;
|
||||
$this->assertCount(1, Transaction::moreThan($amount)->get());
|
||||
$amount++;
|
||||
$this->assertCount(1, Transaction::lessThan($amount)->get());
|
||||
}
|
||||
|
||||
public function testMoreThan()
|
||||
{
|
||||
$transaction = f::create('Transaction');
|
||||
$amount = floatval($transaction->amount);
|
||||
$amount++;
|
||||
|
||||
$amount--;
|
||||
$this->assertCount(1, Transaction::moreThan($amount)->get());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user