MS IZ posts should now update

This commit is contained in:
maxwell 2010-11-02 18:56:00 -07:00
parent 4de89df4dc
commit 0ecc27a935
2 changed files with 11 additions and 0 deletions

View file

@ -178,6 +178,8 @@ class User
def update_post(post, post_hash = {})
if self.owns? post
post.update_attributes(post_hash)
aspects = aspects_with_post(post.id)
self.push_to_aspects(post, aspects)
end
end

View file

@ -226,6 +226,15 @@ describe User do
end
end
describe '#update_post' do
it 'sends a notification to aspects' do
user.should_receive(:push_to_aspects).twice
album = user.post(:album, :name => "cat", :to => aspect.id)
user.update_post(album, :name => 'bat')
end
end
describe 'account removal' do
it 'should unfriend everyone' do
user.should_receive(:unfriend_everyone)