Sha256: 7b222da5d4196746dbced2bad30528dd8258268ac83cc652308fedbb64b24202
Contents?: true
Size: 551 Bytes
Versions: 2
Compression:
Stored size: 551 Bytes
Contents
it "update action should render edit template when model is invalid" do <%= singular_name %> = Factory(:<%= singular_name %>) ActiveRecord::Errors.any_instance.stubs(:empty?).returns(false) put :update, :id => <%= singular_name %> response.should render_template(:edit) end it "update action should redirect when model is valid" do ActiveRecord::Errors.any_instance.stubs(:empty?).returns(true) put :update, :id => Factory(:<%= singular_name %>) response.should redirect_to(<%= item_path_for_spec('url') %>) end
Version data entries
2 entries across 2 versions & 2 rubygems