spec/controllers/orders_spec.rb in rows_controller-1.0.3 vs spec/controllers/orders_spec.rb in rows_controller-1.1.6
- old
+ new
@@ -34,12 +34,12 @@
assigns(:row).should == order
end
it 'checking resources' do
get :index
- subject.send(:resources).should be_a_kind_of(Array)
- assigns(:orders).should be_a_kind_of(Array)
+ subject.send(:resources).to_a.should be_a_kind_of(Array)
+ assigns(:orders).to_a.should be_a_kind_of(Array)
assigns(:orders).should == Order.all
assigns(:rows).should == Order.all
end
it 'checking model_class' do
@@ -49,16 +49,16 @@
subject.send(:model_symbol).should == 'order'
subject.send(:model_symbol_plural).should == 'orders'
end
it 'should update' do
- put :update, { id: order.id }
+ put :update, { id: order.id, order: {name: 'name'} }
response.should be_true
response.should redirect_to(action: :edit)
end
it 'should update #2' do
- put :update, { id: order.id, commit: 'OK' }
+ put :update, { id: order.id, commit: 'OK', order: {name: 'name'} }
response.should be_true
response.should redirect_to(action: :index)
end
it 'should not update' do