diff --git a/spec/models/user/posting_spec.rb b/spec/models/user/posting_spec.rb index 563e1473b..7b6913c0c 100644 --- a/spec/models/user/posting_spec.rb +++ b/spec/models/user/posting_spec.rb @@ -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 diff --git a/spec/models/user/receive_spec.rb b/spec/models/user/receive_spec.rb index c9ec4e207..03c347408 100644 --- a/spec/models/user/receive_spec.rb +++ b/spec/models/user/receive_spec.rb @@ -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