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)
|
activemodel (= 3.0.0)
|
||||||
activesupport (= 3.0.0)
|
activesupport (= 3.0.0)
|
||||||
activesupport (3.0.0)
|
activesupport (3.0.0)
|
||||||
addressable (2.2.1)
|
addressable (2.2.2)
|
||||||
arel (1.0.1)
|
arel (1.0.1)
|
||||||
activesupport (~> 3.0.0)
|
activesupport (~> 3.0.0)
|
||||||
aws (2.3.21)
|
aws (2.3.21)
|
||||||
|
|
@ -172,7 +172,7 @@ GEM
|
||||||
mini_fb (1.1.3)
|
mini_fb (1.1.3)
|
||||||
hashie
|
hashie
|
||||||
rest-client
|
rest-client
|
||||||
mini_magick (2.1)
|
mini_magick (2.3)
|
||||||
subexec (~> 0.0.4)
|
subexec (~> 0.0.4)
|
||||||
mocha (0.9.8)
|
mocha (0.9.8)
|
||||||
rake
|
rake
|
||||||
|
|
|
||||||
5
ci.sh
5
ci.sh
|
|
@ -4,6 +4,7 @@ echo "**************************************************************************
|
||||||
echo "* ruby 1.8.7-p249 build *" &&
|
echo "* ruby 1.8.7-p249 build *" &&
|
||||||
echo "*************************************************************************************************" &&
|
echo "*************************************************************************************************" &&
|
||||||
echo "" &&
|
echo "" &&
|
||||||
|
rm Gemfile.lock &&
|
||||||
source /usr/local/rvm/scripts/rvm &&
|
source /usr/local/rvm/scripts/rvm &&
|
||||||
rvm use ruby-1.8.7-p249 &&
|
rvm use ruby-1.8.7-p249 &&
|
||||||
bundle install &&
|
bundle install &&
|
||||||
|
|
@ -13,8 +14,8 @@ echo "**************************************************************************
|
||||||
echo "* ruby 1.9.2-p0 build *" &&
|
echo "* ruby 1.9.2-p0 build *" &&
|
||||||
echo "*************************************************************************************************" &&
|
echo "*************************************************************************************************" &&
|
||||||
echo "" &&
|
echo "" &&
|
||||||
|
rm Gemfile.lock &&
|
||||||
source /usr/local/rvm/scripts/rvm &&
|
source /usr/local/rvm/scripts/rvm &&
|
||||||
rvm use ruby-1.9.2-p0 &&
|
rvm use ruby-1.9.2-p0 &&
|
||||||
bundle install &&
|
bundle install &&
|
||||||
bundle exec rake ci &&
|
bundle exec rake ci
|
||||||
rm Gemfile.lock
|
|
||||||
|
|
|
||||||
|
|
@ -166,19 +166,22 @@ describe User do
|
||||||
describe 'unfriending' do
|
describe 'unfriending' do
|
||||||
before do
|
before do
|
||||||
friend_users(user,aspect, user2, aspect2)
|
friend_users(user,aspect, user2, aspect2)
|
||||||
|
user.reload
|
||||||
|
user2.reload
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'should unfriend the other user on the same seed' do
|
it 'should unfriend the other user on the same seed' do
|
||||||
user.friends(true).count.should == 1
|
user.friends.count.should == 1
|
||||||
user2.friends(true).count.should == 1
|
user2.friends.count.should == 1
|
||||||
|
|
||||||
user2.unfriend user.person
|
user2.unfriend user.person
|
||||||
|
user2.reload
|
||||||
|
|
||||||
user2.friends(true).count.should == 0
|
user2.friends.count.should == 0
|
||||||
user.unfriended_by user2.person
|
user.unfriended_by user2.person
|
||||||
|
|
||||||
aspect.reload.people(true).count.should == 0
|
aspect.reload.people.count.should == 0
|
||||||
aspect2.reload.people(true).count.should == 0
|
aspect2.reload.people.count.should == 0
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with a post' do
|
context 'with a post' do
|
||||||
|
|
@ -189,10 +192,10 @@ describe User do
|
||||||
user.unfriended_by user2.person
|
user.unfriended_by user2.person
|
||||||
end
|
end
|
||||||
it "deletes the unfriended user's posts from visible_posts" do
|
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
|
end
|
||||||
it "deletes the unfriended user's posts from the aspect's posts" do
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue