module ThoughtBot::Shoulda::Controller::XML::ClassMethods
def make_update_xml_tests(res) # :nodoc:
def make_update_xml_tests(res) # :nodoc: context "on PUT to #{controller_name_from_class}#update as xml" do setup do request_xml @record = get_existing_record(res) parent_params = make_parent_params(res, @record) put :update, parent_params.merge(res.identifier => @record.to_param, res.object => res.update.params) end if res.denied.actions.include?(:update) should_not_assign_to res.object should_respond_with 401 else should_assign_to res.object should "not have errors on @#{res.object}" do assert_equal [], assigns(res.object).errors.full_messages, "@#{res.object} has errors:" end end end end