Merge branch 'master' of github.com:diaspora/diaspora
This commit is contained in:
commit
add350ce16
3 changed files with 15 additions and 11 deletions
|
|
@ -96,7 +96,7 @@ GEM
|
|||
activemodel (= 3.0.0)
|
||||
activesupport (= 3.0.0)
|
||||
activesupport (3.0.0)
|
||||
addressable (2.2.1)
|
||||
addressable (2.2.2)
|
||||
arel (1.0.1)
|
||||
activesupport (~> 3.0.0)
|
||||
aws (2.3.21)
|
||||
|
|
@ -172,7 +172,7 @@ GEM
|
|||
mini_fb (1.1.3)
|
||||
hashie
|
||||
rest-client
|
||||
mini_magick (2.1)
|
||||
mini_magick (2.3)
|
||||
subexec (~> 0.0.4)
|
||||
mocha (0.9.8)
|
||||
rake
|
||||
|
|
|
|||
5
ci.sh
5
ci.sh
|
|
@ -4,6 +4,7 @@ echo "**************************************************************************
|
|||
echo "* ruby 1.8.7-p249 build *" &&
|
||||
echo "*************************************************************************************************" &&
|
||||
echo "" &&
|
||||
rm Gemfile.lock &&
|
||||
source /usr/local/rvm/scripts/rvm &&
|
||||
rvm use ruby-1.8.7-p249 &&
|
||||
bundle install &&
|
||||
|
|
@ -13,8 +14,8 @@ echo "**************************************************************************
|
|||
echo "* ruby 1.9.2-p0 build *" &&
|
||||
echo "*************************************************************************************************" &&
|
||||
echo "" &&
|
||||
rm Gemfile.lock &&
|
||||
source /usr/local/rvm/scripts/rvm &&
|
||||
rvm use ruby-1.9.2-p0 &&
|
||||
bundle install &&
|
||||
bundle exec rake ci &&
|
||||
rm Gemfile.lock
|
||||
bundle exec rake ci
|
||||
|
|
|
|||
|
|
@ -166,19 +166,22 @@ describe User do
|
|||
describe 'unfriending' do
|
||||
before do
|
||||
friend_users(user,aspect, user2, aspect2)
|
||||
user.reload
|
||||
user2.reload
|
||||
end
|
||||
|
||||
it 'should unfriend the other user on the same seed' do
|
||||
user.friends(true).count.should == 1
|
||||
user2.friends(true).count.should == 1
|
||||
user.friends.count.should == 1
|
||||
user2.friends.count.should == 1
|
||||
|
||||
user2.unfriend user.person
|
||||
user2.reload
|
||||
|
||||
user2.friends(true).count.should == 0
|
||||
user2.friends.count.should == 0
|
||||
user.unfriended_by user2.person
|
||||
|
||||
aspect.reload.people(true).count.should == 0
|
||||
aspect2.reload.people(true).count.should == 0
|
||||
aspect.reload.people.count.should == 0
|
||||
aspect2.reload.people.count.should == 0
|
||||
end
|
||||
|
||||
context 'with a post' do
|
||||
|
|
@ -189,10 +192,10 @@ describe User do
|
|||
user.unfriended_by user2.person
|
||||
end
|
||||
it "deletes the unfriended user's posts from visible_posts" do
|
||||
user.raw_visible_posts(true).include?(@message.id).should be_false
|
||||
user.reload.raw_visible_posts.include?(@message.id).should be_false
|
||||
end
|
||||
it "deletes the unfriended user's posts from the aspect's posts" do
|
||||
aspect2.posts(true).include?(@message).should be_false
|
||||
aspect2.posts.include?(@message).should be_false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue