updated spec to fix to_datetime issue
Conflicts: spec/lib/diaspora/fetcher/public_spec.rb
This commit is contained in:
parent
f0eacc801b
commit
a78cb352e6
1 changed files with 12 additions and 3 deletions
|
|
@ -89,7 +89,7 @@ describe PublicFetcher do
|
||||||
|
|
||||||
it 'applies the date from JSON to the record' do
|
it 'applies the date from JSON to the record' do
|
||||||
@data.each do |post|
|
@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 = StatusMessage.find_by_guid(post['guid'])
|
||||||
entry.created_at.should eql(date)
|
entry.created_at.should eql(date)
|
||||||
|
|
@ -102,6 +102,15 @@ describe PublicFetcher do
|
||||||
entry.raw_message.should eql(post['text'])
|
entry.raw_message.should eql(post['text'])
|
||||||
end
|
end
|
||||||
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue