From 027f096ca7be7dc8c1e6829766a593681cb6169e Mon Sep 17 00:00:00 2001 From: Ilyaaaaaaaaaaaaa Zhitomirskiy Date: Tue, 5 Jul 2011 12:08:03 -0700 Subject: [PATCH] turns out for the join in the controller to work the current user needs to have contacts to whom they went to, added a spec --- features/follows_tags.feature | 9 ++++++--- spec/controllers/tags_controller_spec.rb | 7 +++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/features/follows_tags.feature b/features/follows_tags.feature index f05339b5c..ccacb623a 100644 --- a/features/follows_tags.feature +++ b/features/follows_tags.feature @@ -8,6 +8,8 @@ Feature: posting Given a user with username "bob" And a user with username "alice" When I sign in as "bob@bob.bob" + + And a user with username "bob" is connected with "alice" And I am on the home page And I expand the publisher @@ -40,9 +42,10 @@ Feature: posting Then I should see "I am da #boss" Scenario: can stop following a particular tag - Then I should see "Stop Following #boss" - When I go to the home page - And I should not see "#boss" in ".left_nav" + When I press "Stop Following #boss" + + And I go to the home page + Then I should not see "#boss" within ".left_nav" diff --git a/spec/controllers/tags_controller_spec.rb b/spec/controllers/tags_controller_spec.rb index 0754db63c..34d892e5f 100644 --- a/spec/controllers/tags_controller_spec.rb +++ b/spec/controllers/tags_controller_spec.rb @@ -62,6 +62,13 @@ describe TagsController do assigns(:posts).models.should == [other_post] response.status.should == 200 end + + it 'displays a public post that was sent to no one' do + stranger = Factory(:user_with_aspect) + stranger_post = stranger.post(:status_message, :text => "#hello", :public => true, :to => 'all') + get :show, :name => 'hello' + assigns(:posts).models.should == [stranger_post] + end end context "not signed in" do