Skip to content
Extraits de code Groupes Projets
Valider 56c6688c rédigé par Sarah Mei's avatar Sarah Mei
Parcourir les fichiers

Take out reloads so specs run on 1.9.2

parent da9819e0
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -96,7 +96,7 @@ GEM ...@@ -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 ...@@ -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
......
...@@ -166,19 +166,22 @@ describe User do ...@@ -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 ...@@ -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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter