using timecop for interactions + whitespaces removed

This commit is contained in:
Florian Staudacher 2012-04-15 03:10:18 +02:00
parent d328cdaa96
commit d9d7bbb74b
3 changed files with 15 additions and 13 deletions

View file

@ -14,7 +14,7 @@ atom_feed({'xmlns:thr' => 'http://purl.org/syndication/thread/1.0',
feed.logo "#{@user.person.profile.image_url(:thumb_small)}" feed.logo "#{@user.person.profile.image_url(:thumb_small)}"
feed.updated @posts[0].created_at if @posts.length > 0 feed.updated @posts[0].created_at if @posts.length > 0
feed.tag! :link, :rel => 'avatar', :type => 'image/jpeg', 'media:width' => '100', feed.tag! :link, :rel => 'avatar', :type => 'image/jpeg', 'media:width' => '100',
'media:height' => '100', :href => "#{@user.profile.image_url}" 'media:height' => '100', :href => "#{@user.profile.image_url}"
feed.tag! :link, :href => "#{AppConfig[:pubsub_server]}", :rel => 'hub' feed.tag! :link, :href => "#{AppConfig[:pubsub_server]}", :rel => 'hub'
feed.author do |author| feed.author do |author|

View file

@ -9,10 +9,12 @@ describe Diaspora::Relayable do
describe 'interacted_at' do describe 'interacted_at' do
it 'sets the interacted at of the parent to the created at of the relayable post' do it 'sets the interacted at of the parent to the created at of the relayable post' do
relayable = build_object Timecop.freeze do
relayable.save relayable = build_object
if relayable.parent.respond_to?(:interacted_at) #I'm sorry. relayable.save
relayable.parent.interacted_at.to_i.should == relayable.created_at.to_i if relayable.parent.respond_to?(:interacted_at) #I'm sorry.
relayable.parent.interacted_at.to_i.should == relayable.created_at.to_i
end
end end
end end
end end