Two pending specs on photo serialization for Max and Ilya
This commit is contained in:
parent
15ecc22130
commit
20d5daafbc
1 changed files with 17 additions and 21 deletions
|
|
@ -92,25 +92,25 @@ describe Photo do
|
|||
|
||||
end
|
||||
|
||||
describe 'remote photos' do
|
||||
it 'should write the url on serialization' do
|
||||
@photo.image = File.open(@fixture_name)
|
||||
@photo.image.store!
|
||||
@photo.save
|
||||
|
||||
xml = @photo.to_xml.to_s
|
||||
|
||||
xml.include?(@photo.image.url).should be true
|
||||
end
|
||||
|
||||
it 'should have an album id on serialization' do
|
||||
describe 'serialization' do
|
||||
before do
|
||||
@photo.image.store! File.open(@fixture_name)
|
||||
xml = @photo.to_xml.to_s
|
||||
xml.include?(@photo.album_id.to_s).should be true
|
||||
@xml = @photo.to_xml.to_s
|
||||
end
|
||||
|
||||
it 'serializes the url' do
|
||||
@xml.include?(@photo.image.url).should be true
|
||||
end
|
||||
it 'serializes the album_id' do
|
||||
@xml.include?(@photo.album_id.to_s).should be true
|
||||
end
|
||||
it 'serializes the diaspora_handle' do
|
||||
pending "For IZ, MS"
|
||||
@xml.include?(@user.diaspora_handle).should be true
|
||||
end
|
||||
end
|
||||
describe 'remote photos' do
|
||||
it 'should set the remote_photo on marshalling' do
|
||||
pending "did the socket get unstubbed?"
|
||||
pending "For IZ, MS"
|
||||
@photo.image.store! File.open(@fixture_name)
|
||||
|
||||
|
||||
|
|
@ -118,10 +118,6 @@ describe Photo do
|
|||
user2 = Factory.create(:user)
|
||||
aspect2 = user2.aspects.create(:name => "foobars")
|
||||
friend_users(@user, @aspect, user2, aspect2)
|
||||
@photo.person = user2.person
|
||||
|
||||
@photo.save
|
||||
#@photo.reload
|
||||
|
||||
url = @photo.url
|
||||
thumb_url = @photo.url :thumb_medium
|
||||
|
|
@ -130,7 +126,7 @@ describe Photo do
|
|||
id = @photo.id
|
||||
|
||||
@photo.destroy
|
||||
@user.receive xml, @photo.person
|
||||
user2.receive xml, @user.person
|
||||
|
||||
new_photo = Photo.first(:id => id)
|
||||
new_photo.url.nil?.should be false
|
||||
|
|
|
|||
Loading…
Reference in a new issue