2016-04-27 23:15:49 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use Illuminate\Foundation\Testing\WithoutMiddleware;
|
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseMigrations;
|
|
|
|
|
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
|
|
|
|
|
|
|
|
|
class UserTest extends TestCase
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
2016-06-16 01:36:09 +00:00
|
|
|
* Test sign up page is successful
|
2016-04-27 23:15:49 +00:00
|
|
|
*
|
|
|
|
|
* @return void
|
|
|
|
|
*/
|
|
|
|
|
public function testSignup()
|
|
|
|
|
{
|
|
|
|
|
$this->visit(route('showSignup'))
|
|
|
|
|
->type('Joe', 'first_name')
|
|
|
|
|
->type('Blogs', 'last_name')
|
|
|
|
|
->type($this->faker->email, 'email')
|
|
|
|
|
->type('password', 'password')
|
|
|
|
|
->type('password', 'password_confirmation')
|
|
|
|
|
->check('terms_agreed')
|
|
|
|
|
->press('Sign Up')
|
|
|
|
|
->seePageIs(route('login'));
|
|
|
|
|
}
|
2016-06-16 01:36:09 +00:00
|
|
|
|
2016-04-27 23:15:49 +00:00
|
|
|
public function testLogin()
|
|
|
|
|
{
|
|
|
|
|
$this->visit(route('login'))
|
|
|
|
|
->type($this->test_user_email, 'email')
|
|
|
|
|
->type($this->test_user_password, 'password')
|
|
|
|
|
->press('Login')
|
|
|
|
|
->seePageIs(route('showCreateOrganiser', ['first_run' => '1']));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|