firefly-iii/tests/Feature/Controllers/NewUserControllerTest.php

47 lines
1.2 KiB
PHP
Raw Normal View History

2017-02-12 05:00:11 -06:00
<?php
/**
* NewUserControllerTest.php
* Copyright (c) 2017 thegrumpydictator@gmail.com
* This software may be modified and distributed under the terms of the Creative Commons Attribution-ShareAlike 4.0 International License.
*
* See the LICENSE file for details.
*/
declare(strict_types = 1);
namespace Tests\Feature\Controllers;
use Tests\TestCase;
class NewUserControllerTest extends TestCase
{
2017-02-12 05:21:44 -06:00
/**
* @covers \FireflyIII\Http\Controllers\NewUserController::index
2017-02-17 13:14:38 -06:00
* @covers \FireflyIII\Http\Controllers\NewUserController::__construct
2017-02-12 05:21:44 -06:00
*/
public function testIndex()
{
$this->be($this->emptyUser());
$response = $this->get(route('new-user.index'));
$response->assertStatus(200);
$response->assertSee('<ol class="breadcrumb">');
}
/**
* @covers \FireflyIII\Http\Controllers\NewUserController::submit
*/
public function testSubmit()
{
$data = [
'bank_name' => 'New bank',
'bank_balance' => 100,
];
$this->be($this->emptyUser());
$response = $this->post(route('new-user.submit'), $data);
$response->assertStatus(302);
$response->assertSessionHas('success');
}
2017-02-16 15:33:32 -06:00
}