2015-03-28 00:48:38 -05:00
|
|
|
<?php
|
2015-03-31 12:21:49 -05:00
|
|
|
use FireflyIII\Models\Preference;
|
2015-04-02 15:39:31 -05:00
|
|
|
use FireflyIII\Models\TransactionCurrency;
|
2015-03-28 00:48:38 -05:00
|
|
|
/**
|
|
|
|
* Generated by PHPUnit_SkeletonGenerator on 2015-03-08 at 20:05:14.
|
|
|
|
*/
|
|
|
|
class AccountControllerTest extends TestCase
|
|
|
|
{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets up the fixture, for example, opens a network connection.
|
|
|
|
* This method is called before a test is executed.
|
|
|
|
*/
|
|
|
|
public function setUp()
|
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2015-04-02 15:51:00 -05:00
|
|
|
|
2015-03-28 00:48:38 -05:00
|
|
|
/**
|
|
|
|
* Tears down the fixture, for example, closes a network connection.
|
|
|
|
* This method is called after a test is executed.
|
|
|
|
*/
|
|
|
|
public function tearDown()
|
|
|
|
{
|
|
|
|
parent::tearDown();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function testCreate()
|
|
|
|
{
|
2015-03-31 10:49:47 -05:00
|
|
|
$this->be(new FireflyIII\User);
|
2015-03-31 12:21:49 -05:00
|
|
|
|
|
|
|
$pref = new Preference;
|
|
|
|
$pref->data = '1M';
|
|
|
|
|
2015-04-02 15:39:31 -05:00
|
|
|
// CURRENCY:
|
|
|
|
$currency = new TransactionCurrency;
|
|
|
|
|
2015-03-31 12:21:49 -05:00
|
|
|
Preferences::shouldReceive('get', 'viewRange')->andReturn($pref);
|
2015-04-02 15:39:31 -05:00
|
|
|
Amount::shouldReceive('getDefaultCurrency')->andReturn($currency);
|
2015-04-03 00:33:18 -05:00
|
|
|
Amount::shouldReceive('getAllCurrencies')->andReturn([$currency]);
|
|
|
|
// get all currencires?
|
2015-03-31 12:21:49 -05:00
|
|
|
|
2015-03-28 00:48:38 -05:00
|
|
|
$response = $this->call('GET', '/accounts/create/asset');
|
|
|
|
$this->assertResponseOk();
|
2015-03-31 12:21:49 -05:00
|
|
|
|
|
|
|
|
2015-03-28 00:48:38 -05:00
|
|
|
$this->assertViewHas('subTitle', 'Create a new asset account');
|
|
|
|
$this->assertViewHas('subTitleIcon', 'fa-money');
|
|
|
|
$this->assertViewHas('what', 'asset');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testDelete()
|
|
|
|
{
|
|
|
|
$this->markTestIncomplete();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testDestroy()
|
|
|
|
{
|
|
|
|
$this->markTestIncomplete();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testEdit()
|
|
|
|
{
|
|
|
|
$this->markTestIncomplete();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testIndex()
|
|
|
|
{
|
|
|
|
$this->markTestIncomplete();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testShow()
|
|
|
|
{
|
|
|
|
$this->markTestIncomplete();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testStore()
|
|
|
|
{
|
|
|
|
$this->markTestIncomplete();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testUpdate()
|
|
|
|
{
|
|
|
|
$this->markTestIncomplete();
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|