From d61a227fc7191eab27df04efcbe6b2bb80359073 Mon Sep 17 00:00:00 2001 From: maxwell Date: Thu, 14 Oct 2010 16:49:08 -0700 Subject: [PATCH] posts now serialize their created_at time --- app/models/post.rb | 1 + spec/lib/exporter_spec.rb | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/app/models/post.rb b/app/models/post.rb index aa68dc897..0e1fc1959 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -14,6 +14,7 @@ class Post xml_accessor :_id xml_accessor :person, :as => Person xml_reader :public + xml_reader :created_at key :public , Boolean, :default => false diff --git a/spec/lib/exporter_spec.rb b/spec/lib/exporter_spec.rb index 71e9e3f85..0c177ef45 100644 --- a/spec/lib/exporter_spec.rb +++ b/spec/lib/exporter_spec.rb @@ -39,6 +39,11 @@ describe Diaspora::Exporter do doc.xpath('//posts').to_s.should include status_message1.id.to_s end + it 'should include post created at time' do + doc = Nokogiri::XML::parse(exported) + doc.xpath('//posts').to_s.should include status_message1.created_at.to_s + end + it 'should include a list of users posts' do doc = Nokogiri::XML::parse(exported) posts = doc.xpath('//posts').to_s