diff --git a/spec/lib/diaspora/fetcher/public_spec.rb b/spec/lib/diaspora/fetcher/public_spec.rb index 07f89812a..382df7637 100644 --- a/spec/lib/diaspora/fetcher/public_spec.rb +++ b/spec/lib/diaspora/fetcher/public_spec.rb @@ -86,10 +86,10 @@ describe PublicFetcher do process_posts } end - + it 'applies the date from JSON to the record' do @data.each do |post| - date = ActiveSupport::TimeZone.new('UTC').parse(post['created_at']) + date = ActiveSupport::TimeZone.new('UTC').parse(post['created_at']).to_datetime entry = StatusMessage.find_by_guid(post['guid']) entry.created_at.should eql(date) @@ -102,6 +102,15 @@ describe PublicFetcher do entry.raw_message.should eql(post['text']) end end + + it 'applies now to interacted_at on the record' do + @data.each do |post| + date = ActiveSupport::TimeZone.new('UTC').parse(@now.to_s).to_datetime + + entry = StatusMessage.find_by_guid(post['guid']) + entry.interacted_at.should eql(date) + end + end end end @@ -235,4 +244,4 @@ describe PublicFetcher do end end end -end \ No newline at end of file +end