OSDN Git Service

t#30473:fix authenticate
[pettanr/pettanr.git] / spec / controllers / panel_colors_controller_spec.rb
index b68a65b..e77f91a 100644 (file)
@@ -114,6 +114,16 @@ if MagicNumber['run_mode'] == 1
         end
       end
     end
+    context '作家権限はないが管理者権限があるとき' do
+      before do
+        sign_out @user
+        sign_in @admin
+      end
+      it 'ステータスコード200 OKを返す' do
+        get :index
+        response.should be_success 
+      end
+    end
   end
   
   describe '単体表示に於いて' do
@@ -184,6 +194,16 @@ if MagicNumber['run_mode'] == 1
         end
       end
     end
+    context '作家権限はないが管理者権限があるとき' do
+      before do
+        sign_out @user
+        sign_in @admin
+      end
+      it 'ステータスコード200 OKを返す' do
+        get :show, :id => @pc.id
+        response.should be_success 
+      end
+    end
   end
   
 else