Fix a couple more specs

This commit is contained in:
Raphael 2010-10-19 18:54:18 -07:00
parent 43dd95147e
commit 52f7350f78
2 changed files with 4 additions and 7 deletions

View file

@ -54,9 +54,7 @@ describe Diaspora::Parser do
retraction = Retraction.for(message)
xml = retraction.to_diaspora_xml
StatusMessage.count.should == 1
@user.receive xml, person
StatusMessage.count.should == 0
proc {@user.receive xml, person}.should change(StatusMessage, :count).by(-1)
end
it "should create a new person upon getting a person request" do

View file

@ -51,8 +51,7 @@ describe Photo do
it 'should have a caption' do
@photo.image.store! File.open(@fixture_name)
@photo.caption = "cool story, bro"
@photo.save
Photo.first.caption.should == "cool story, bro"
@photo.save.should be_true
end
it 'should remove its reference in user profile if it is referred' do
@ -63,9 +62,9 @@ describe Photo do
@user.save
@user.person.save
User.first.profile.image_url.should == @photo.image.url(:thumb_medium)
@user.profile.image_url.should == @photo.image.url(:thumb_medium)
@photo.destroy
User.first.profile.image_url.should be nil
@user.profile.image_url.should be nil
end
it 'should not use the imported filename as the url' do