require 'test_helper' class EppDomainRenewTest < ApplicationIntegrationTest self.use_transactional_fixtures = false setup do travel_to Time.zone.parse('2010-07-05') end def test_domain_cannot_be_renewed_when_invalid request_xml = <<-XML invalid.test 2010-07-05 1 XML assert_no_changes -> { domains(:invalid).valid_to } do post '/epp/command/renew', { frame: request_xml }, 'HTTP_COOKIE' => 'session=api_bestnames' end assert_equal '2304', Nokogiri::XML(response.body).at_css('result')[:code], Nokogiri::XML(response.body).css('result').text end end