mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 23:45:10 +00:00
Some new code + GA
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Class TestCase
|
||||
*/
|
||||
@@ -20,4 +19,18 @@ class TestCase extends Illuminate\Foundation\Testing\TestCase
|
||||
return $app;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $class
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function mock($class)
|
||||
{
|
||||
$mock = Mockery::mock($class);
|
||||
|
||||
$this->app->instance($class, $mock);
|
||||
|
||||
return $mock;
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
use FireflyIII\Models\Preference;
|
||||
|
||||
/**
|
||||
* Generated by PHPUnit_SkeletonGenerator on 2015-03-08 at 20:05:14.
|
||||
@@ -30,8 +31,17 @@ class AccountControllerTest extends TestCase
|
||||
public function testCreate()
|
||||
{
|
||||
$this->be(new FireflyIII\User);
|
||||
|
||||
$pref = new Preference;
|
||||
$pref->data = '1M';
|
||||
|
||||
Preferences::shouldReceive('get', 'viewRange')->andReturn($pref);
|
||||
Amount::shouldReceive('getDefaultCurrency')->andReturn(null);
|
||||
|
||||
$response = $this->call('GET', '/accounts/create/asset');
|
||||
$this->assertResponseOk();
|
||||
|
||||
|
||||
$this->assertViewHas('subTitle', 'Create a new asset account');
|
||||
$this->assertViewHas('subTitleIcon', 'fa-money');
|
||||
$this->assertViewHas('what', 'asset');
|
||||
|
Reference in New Issue
Block a user