From 53dbbfbb151969917cb43c6d16fe601a51d8e6a1 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Sun, 6 Nov 2011 19:10:26 -0800 Subject: Fix order-dependent test that would sometimes fail on postgres --- spec/models/user/querying_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/models/user/querying_spec.rb b/spec/models/user/querying_spec.rb index d010570d3..9baef3545 100644 --- a/spec/models/user/querying_spec.rb +++ b/spec/models/user/querying_spec.rb @@ -75,7 +75,6 @@ describe User do before do aspect_to_post = bob.aspects.where(:name => "generic").first @status = bob.post(:status_message, :text=> "hello", :to => aspect_to_post) - @vis = @status.share_visibilities(Post).first end it "pulls back non hidden posts" do @@ -83,7 +82,8 @@ describe User do end it "does not pull back hidden posts" do - @vis.update_attributes(:hidden => true) + visibility = @status.share_visibilities(Post).where(:contact_id => alice.contact_for(bob.person).id).first + visibility.update_attributes(:hidden => true) alice.visible_shareable_ids(Post).include?(@status.id).should be_false end end -- cgit v1.2.3