post :create, :author => @attr
response.status.should eq 302
end
- it '作成された作家の表示ページへ遷移する' do
+ it 'トップページへ遷移する' do
# Author.any_instance.stub(:save).and_return(true)
post :create, :author => @attr
- response.should redirect_to(Author.last)
+ response.should redirect_to(root_path)
end
end
context 'json形式' do
put :update, :id => @author.id, :author => @attr
response.status.should eq 302
end
- it '更新された作家の表示ページへ遷移する' do
+ it '設定ページへ遷移する' do
put :update, :id => @author.id, :author => @attr
- response.should redirect_to(@author)
+ response.should redirect_to('/home/configure')
end
end
context 'json形式' do