fixed an outdated integration test

This commit is contained in:
zhitomirskiyi 2011-02-09 15:59:17 -08:00
parent e75c285049
commit dbf1452968

View file

@ -324,18 +324,11 @@ describe 'a user receives a post' do
person.save person.save
#Cache profile for checking against marshaled profile #Cache profile for checking against marshaled profile
old_profile = person.profile.dup new_profile = person.profile.dup
old_profile.first_name.should == 'bob' new_profile.first_name = 'boo!!!'
#Build xml for profile, clear profile #Build xml for profile
xml = person.profile.to_diaspora_xml xml = new_profile.to_diaspora_xml
reloaded_person = Person.find(id)
reloaded_person.profile.delete
reloaded_person.save(:validate => false)
#Make sure profile is cleared
Person.find(id).profile.should be nil
old_profile.first_name.should == 'bob'
#Marshal profile #Marshal profile
zord = Postzord::Receiver.new(@user1, :person => person) zord = Postzord::Receiver.new(@user1, :person => person)
@ -343,9 +336,8 @@ describe 'a user receives a post' do
#Check that marshaled profile is the same as old profile #Check that marshaled profile is the same as old profile
person = Person.find(person.id) person = Person.find(person.id)
person.profile.should_not be nil person.profile.first_name.should == new_profile.first_name
person.profile.first_name.should == old_profile.first_name person.profile.last_name.should == new_profile.last_name
person.profile.last_name.should == old_profile.last_name person.profile.image_url.should == new_profile.image_url
person.profile.image_url.should == old_profile.image_url
end end
end end