mirror of
				https://github.com/firefly-iii/firefly-iii.git
				synced 2025-11-04 05:15:39 +00:00 
			
		
		
		
	Updated test code.
This commit is contained in:
		@@ -2,7 +2,6 @@
 | 
			
		||||
 | 
			
		||||
namespace FireflyIII\Http\Controllers;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
use Crypt;
 | 
			
		||||
use File;
 | 
			
		||||
use FireflyIII\Helpers\Attachments\AttachmentHelperInterface;
 | 
			
		||||
 
 | 
			
		||||
@@ -12,6 +12,9 @@
 | 
			
		||||
 */
 | 
			
		||||
class AccountControllerTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\AccountController::create
 | 
			
		||||
     */
 | 
			
		||||
    public function testCreate()
 | 
			
		||||
    {
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
@@ -19,6 +22,9 @@ class AccountControllerTest extends TestCase
 | 
			
		||||
        $this->assertEquals(200, $response->status());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\AccountController::delete
 | 
			
		||||
     */
 | 
			
		||||
    public function testDelete()
 | 
			
		||||
    {
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
@@ -26,6 +32,9 @@ class AccountControllerTest extends TestCase
 | 
			
		||||
        $this->assertEquals(200, $response->status());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\AccountController::destroy
 | 
			
		||||
     */
 | 
			
		||||
    public function testDestroy()
 | 
			
		||||
    {
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
@@ -41,6 +50,9 @@ class AccountControllerTest extends TestCase
 | 
			
		||||
        $this->assertEquals(302, $response->status());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\AccountController::edit
 | 
			
		||||
     */
 | 
			
		||||
    public function testEdit()
 | 
			
		||||
    {
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
@@ -48,6 +60,9 @@ class AccountControllerTest extends TestCase
 | 
			
		||||
        $this->assertEquals(200, $response->status());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\AccountController::index
 | 
			
		||||
     */
 | 
			
		||||
    public function testIndex()
 | 
			
		||||
    {
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
@@ -55,6 +70,9 @@ class AccountControllerTest extends TestCase
 | 
			
		||||
        $this->assertEquals(200, $response->status());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\AccountController::show
 | 
			
		||||
     */
 | 
			
		||||
    public function testShow()
 | 
			
		||||
    {
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
@@ -62,6 +80,9 @@ class AccountControllerTest extends TestCase
 | 
			
		||||
        $this->assertEquals(200, $response->status());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\AccountController::store
 | 
			
		||||
     */
 | 
			
		||||
    public function testStore()
 | 
			
		||||
    {
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
@@ -81,9 +102,15 @@ class AccountControllerTest extends TestCase
 | 
			
		||||
        $this->markTestIncomplete();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\AccountController::update
 | 
			
		||||
     * @todo   Implement testUpdate().
 | 
			
		||||
     */
 | 
			
		||||
    public function testUpdate()
 | 
			
		||||
    {
 | 
			
		||||
        $this->markTestIncomplete();
 | 
			
		||||
        // Remove the following lines when you implement this test.
 | 
			
		||||
        $this->markTestIncomplete(
 | 
			
		||||
            'This test has not been implemented yet.'
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -9,14 +9,17 @@
 | 
			
		||||
 */
 | 
			
		||||
class HomeControllerTest extends TestCase
 | 
			
		||||
{
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\HomeController::dateRange
 | 
			
		||||
     */
 | 
			
		||||
    public function testDateRange()
 | 
			
		||||
    {
 | 
			
		||||
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
 | 
			
		||||
        $args = [
 | 
			
		||||
            'start' => '2012-01-01',
 | 
			
		||||
            'end'   => '2012-04-01',
 | 
			
		||||
            'start'  => '2012-01-01',
 | 
			
		||||
            'end'    => '2012-04-01',
 | 
			
		||||
            '_token' => Session::token(),
 | 
			
		||||
        ];
 | 
			
		||||
 | 
			
		||||
@@ -26,6 +29,9 @@ class HomeControllerTest extends TestCase
 | 
			
		||||
        $this->assertSessionHas('warning', '91 days of data may take a while to load.');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\HomeController::flush
 | 
			
		||||
     */
 | 
			
		||||
    public function testFlush()
 | 
			
		||||
    {
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
@@ -33,12 +39,13 @@ class HomeControllerTest extends TestCase
 | 
			
		||||
        $this->assertEquals(302, $response->status());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * @covers FireflyIII\Http\Controllers\HomeController::index
 | 
			
		||||
     */
 | 
			
		||||
    public function testIndex()
 | 
			
		||||
    {
 | 
			
		||||
        $this->be($this->user());
 | 
			
		||||
        $response = $this->call('GET', '/');
 | 
			
		||||
        $this->assertEquals(200, $response->status());
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user