Try to fix annoying xml time spec failure

This commit is contained in:
Raphael Sofaer 2011-04-12 16:21:42 -07:00
parent 8c0dcdde08
commit a0f98d888a

View file

@ -96,7 +96,8 @@ describe Diaspora::Exporter do
it 'should include post created at time' do
doc = Nokogiri::XML::parse(posts_xml)
xml_time = Time.zone.parse(doc.xpath('//posts/status_message/created_at').first.text)
target_xml = doc.xpath('//posts/status_message').detect{|status| status.to_s.include?(@status_message1.text)}
xml_time = Time.zone.parse(target_xml.xpath('//status_message').text)
xml_time.to_i.should == @status_message1.created_at.to_i
end
end