describe User do
before do
- FactoryGirl.create :admin
+ @admin = FactoryGirl.create :admin
end
- describe '作成に於いて' do
- context '作家の自動作成' do
- it '作家が作成されている' do
- lambda {
- @user = FactoryGirl.create( :user_yas)
- }.should change(Author, :count)
- end
- it '作家とユーザがリンクされている' do
- @user = FactoryGirl.create( :user_yas)
- Author.find_by_user_id(@user.id).should_not eq nil
- end
- end
- end
-
describe 'トークン作成に於いて' do
before do
@user = FactoryGirl.create( :user_yas)