Show
Ignore:
Timestamp:
07/04/08 00:48:44 (5 months ago)
Author:
kumatch
Message:

Changed the return object after authenticate().

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • events/phpframework/piece_framework/trunk/specs/Phwittr/Authentication/NormalSpec.php

    r14659 r15133  
    5858    } 
    5959 
    60     public function it認証はユーザ名とパスワードで行い、成功するとユーザ情報が得られる() 
     60    public function it認証はユーザ名とパスワードで行い、成功するとphwittr_selfオブジェクトが得られる() 
    6161    { 
    6262 
    63         $user = Phwittr_Service::authenticate($this->_foo->userName, 
     63        $self = Phwittr_Service::authenticate($this->_foo->userName, 
    6464                                              $this->_foo->password 
    6565                                              ); 
    6666 
    67         $this->spec($user->userName)->should->be($this->_foo->userName); 
    68         $this->spec($user->email)->should->be($this->_foo->email); 
     67        $this->spec($self instanceof Phwittr_Self)->should->beTrue(); 
     68        $this->spec($self->userName)->should->be($this->_foo->userName); 
     69        $this->spec($self->email)->should->be($this->_foo->email); 
    6970    } 
    7071 
    71     public function it認証はメールアドレスとパスワードでも行え、成功するとユーザ情報が得られる() 
     72    public function it認証はメールアドレスとパスワードでも行え、成功するとphwittr_selfオブジェクトが得られる() 
    7273    { 
    73         $user = Phwittr_Service::authenticate($this->_foo->email, 
     74        $self = Phwittr_Service::authenticate($this->_foo->email, 
    7475                                              $this->_foo->password 
    7576                                              ); 
    7677 
    77         $this->spec($user->userName)->should->be($this->_foo->userName); 
    78         $this->spec($user->email)->should->be($this->_foo->email); 
     78        $this->spec($self instanceof Phwittr_Self)->should->beTrue(); 
     79        $this->spec($self->userName)->should->be($this->_foo->userName); 
     80        $this->spec($self->email)->should->be($this->_foo->email); 
    7981    } 
    8082