Add a spec, move another to posting

This commit is contained in:
Raphael 2010-10-08 14:37:22 -07:00
parent 293ccdf3e4
commit 6064b2e022
2 changed files with 12 additions and 2 deletions

View file

@ -44,6 +44,11 @@ describe User do
aspect.reload
aspect.posts.should include album
end
it "should add the post to that user's visible posts" do
status_message = user.post :status_message, :message => "hi", :to => aspect.id
user.reload
user.raw_visible_posts.include?(status_message).should be true
end
end
describe '#update_post' do

View file

@ -50,10 +50,15 @@ describe User do
end
it "should add the post to that user's posts when a user posts it" do
it "should add a received post to the aspect and visible_posts array" do
status_message = @user.post :status_message, :message => "hi", :to => @aspect.id
@user.reload
@user.raw_visible_posts.include?(status_message).should be true
salmon = @user.salmon(status_message).xml_for @user2.person
@user2.receive_salmon salmon
@user2.reload
@user2.raw_visible_posts.include?(status_message).should be true
@aspect2.reload
@aspect2.posts.include?(status_message).should be_true
end
it 'should be removed on unfriending' do