예제 #1
0
파일: UserTest.php 프로젝트: sorora/aurp
 public function testHashesPasswordWhenSet()
 {
     Hash::shouldReceive('make')->once()->andReturn('hashed');
     $item = new User();
     $item->password = '******';
     $this->assertEquals('hashed', $item->password);
 }
예제 #2
0
 /** @test */
 public function it_not_set_remember_me_cookie_when_remember_not_checked()
 {
     Hash::shouldReceive('check')->once()->andReturn(true)->shouldReceive('needsRehash')->once()->andReturn(false);
     $user = $this->getUserForAuth();
     $this->visit('/auth/login')->submitForm(['email' => $user->email, 'password' => 'test123', 'remember' => false])->notSeeCookie(Auth::getRecallerName());
 }