public function test_a_boss_can_access_admin()
 {
     $admin = User::find(3);
     $this->be($admin);
     $response = $this->call('GET', URL::to('/admin/'));
     $this->assertEquals('200', $response->getStatusCode());
 }
Exemplo n.º 2
0
 public function test_can_register_success()
 {
     $this->addValidator();
     $this->post('/auth/register', ['username' => 'learner', 'email' => '*****@*****.**', 'password' => '121212', 'password_confirmation' => '121212']);
     $user = User::find(1);
     $this->assertEquals($user->email, '*****@*****.**');
     $this->assertTrue(Hash::check('121212', $user->password));
 }