OSDN Git Service

t#29050:fix edit permission on panel v04story
authoryasushiito <yas@pen-chan.jp>
Thu, 19 Jul 2012 23:47:56 +0000 (08:47 +0900)
committeryasushiito <yas@pen-chan.jp>
Thu, 19 Jul 2012 23:47:56 +0000 (08:47 +0900)
app/controllers/panels_controller.rb
spec/controllers/panels_controller_spec.rb

index 85cd8ce..abae3f7 100644 (file)
@@ -100,7 +100,7 @@ class PanelsController < ApplicationController
   # PUT /panels/1
   # PUT /panels/1.json
   def update
-    @panel = Panel.show(params[:id], @author)
+    @panel = Panel.edit(params[:id], @author)
     if params[:json]
       jsn = JSON.parse(params[:json])
     end
index 6d9298a..ff4c090 100644 (file)
@@ -505,9 +505,9 @@ describe PanelsController do
       end\r
     end\r
     context 'つつがなく終わるとき' do\r
-      it 'モデルに取得依頼する' do\r
-        Panel.stub(:show).with(any_args).and_return(@panel)\r
-        Panel.should_receive(:show).exactly(1)\r
+      it 'モデルに編集取得依頼する' do\r
+        Panel.stub(:edit).with(any_args).and_return(@panel)\r
+        Panel.should_receive(:edit).exactly(1)\r
         put :update, :id => @panel.id, :panel => @attr\r
       end\r
       it 'コマモデルに上書き補充を依頼している' do\r