Changeset 13153

Show
Ignore:
Timestamp:
06/04/08 00:30:01 (5 years ago)
Author:
kumatch
Message:

Added a new spec for adding the inexistent user.

Files:
1 modified

Legend:

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

    r12943 r13153  
    167167 
    168168        $this->spec(count($followers))->should->be(0); 
     169    } 
     170 
     171    public function it存在しないユーザを追加しようとするとdbによるエラー() 
     172    { 
     173        try { 
     174            $this->_createUserRecord($this->_foo); 
     175 
     176            $mapper = Piece_ORM::getMapper('Users'); 
     177            $fooUser = $mapper->findByUserName($this->_foo->userName); 
     178 
     179            $following = new Phwittr_Following($fooUser->id); 
     180            $following->addFriend(100); 
     181 
     182            $this->fail(); 
     183        } catch (Exception $e) { 
     184        } 
    169185    } 
    170186