Skip to content
This repository has been archived by the owner on Nov 27, 2021. It is now read-only.

Commit

Permalink
Initialize functional test for logining a tutor. See #3.
Browse files Browse the repository at this point in the history
  • Loading branch information
rdok committed Apr 19, 2016
1 parent 6997630 commit abf8e23
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/functional/tutor/AuthenticationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
*/
namespace Tests\functional\tutor;

use App\Sass\Repositories\User\DbUserRepository;
use App\User;
use Illuminate\Foundation\Testing\DatabaseTransactions;
use Illuminate\Support\Facades\Hash;
use Tests\TestCase;

/**
Expand All @@ -17,7 +20,14 @@ class AuthenticationTest extends TestCase
use DatabaseTransactions;

/** @test */
public function it_access_sign_in_page()
public function it_can_login()
{
$dbUserRepository = new DbUserRepository();
$pass = 'pass';
$tutor = factory(User::class)->create(['password' => Hash::make($pass)]);
$dbUserRepository->assignTutorRole($tutor);

$this->visit(route('login.get'))
->type('email', $tutor->email);
}
}

0 comments on commit abf8e23

Please sign in to comment.