OSDN Git Service

t#30200:update i18n devise
[pettanr/pettanr.git] / spec / controllers / app_controller_spec.rb
index ea9b541..200287b 100644 (file)
@@ -10,7 +10,7 @@ describe SystemController do
     context '要請の必要がないとき' do
       before do
         #要請の必要がない=管理者登録済み かつ ライセンス登録済み
-        FactoryGirl.create :admin
+        @admin = FactoryGirl.create :admin
         @sp = FactoryGirl.create :system_picture
         @lg = FactoryGirl.create :license_group
         @license = FactoryGirl.create :license, :license_group_id => @lg.id, :system_picture_id => @sp.id
@@ -22,7 +22,7 @@ describe SystemController do
       context 'userがサインインしているなら' do
         before do
           @user = FactoryGirl.create( :user_yas)
-          @author = @user.author
+          @author = FactoryGirl.create :author, :user_id => @user.id
           sign_in @user
         end
         it 'userにサインイン中のアカウントをセットしている' do
@@ -46,7 +46,7 @@ describe SystemController do
       context 'userがサインインしていないなら' do
         before do
           @user = FactoryGirl.create( :user_yas)
-          @author = @user.author
+          @author = FactoryGirl.create :author, :user_id => @user.id
           @artist = FactoryGirl.create :artist_yas, :author_id => @author.id
         end
         it 'userが空になっている' do
@@ -97,7 +97,7 @@ describe SystemController do
     end
     context 'ライセンスがないとき' do
       before do
-        FactoryGirl.create :admin
+        @admin = FactoryGirl.create :admin
       end
       context '本機能を開こうとしているなら' do
         it '初期化要請ページに遷移する' do