Sha256: 08a9e5d1245d0eae3036d8aa4b5c55ff782b3cf8e92734bda885299a35e266e7
Contents?: true
Size: 481 Bytes
Versions: 91
Compression:
Stored size: 481 Bytes
Contents
it "update action should render edit template when model is invalid" do <%= class_name %>.any_instance.stubs(:valid?).returns(false) put :update, :id => <%= class_name %>.first response.should render_template(:edit) end it "update action should redirect when model is valid" do <%= class_name %>.any_instance.stubs(:valid?).returns(true) put :update, :id => <%= class_name %>.first response.should redirect_to(<%= item_path_for_spec('url') %>) end
Version data entries
91 entries across 60 versions & 14 rubygems