From 3db0cd3776d1fb739130e8f885d5987698966de7 Mon Sep 17 00:00:00 2001
From: danielgrippi <danielgrippi@gmail.com>
Date: Fri, 6 Jan 2012 10:25:00 -0800
Subject: [PATCH] fix all cukes but the tags feature [ci skip]

---
 app/controllers/people_controller.rb |  2 +-
 app/controllers/tags_controller.rb   |  6 ++----
 app/views/templates/header.jst       |  3 ++-
 features/connects_users.feature      | 10 +++++-----
 features/manages_aspects.feature     |  8 --------
 features/tags.feature                |  9 ---------
 6 files changed, 10 insertions(+), 28 deletions(-)

diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb
index c18b9b4ceb..3405bdacaa 100644
--- a/app/controllers/people_controller.rb
+++ b/app/controllers/people_controller.rb
@@ -22,7 +22,7 @@ class PeopleController < ApplicationController
     if params[:q][0] == 35 || params[:q][0] == '#'
       if params[:q].length > 1
         tag_name = params[:q].gsub(/[#\.]/, '')
-        redirect_to tag_path(:name => tag_name, :q => params[:q])
+        redirect_to tags_path(:q => params[:q])
         return
       else
         flash[:error] = I18n.t('tags.show.none', :name => params[:q])
diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb
index 2964f625cc..17818b8c08 100644
--- a/app/controllers/tags_controller.rb
+++ b/app/controllers/tags_controller.rb
@@ -15,16 +15,14 @@ class TagsController < ApplicationController
   respond_to :json, :only => [:index, :show]
 
   def index
-    if params[:q] && params[:q].length > 1 && request.format.json?
+    if params[:q] && params[:q].length > 1
       params[:q].gsub!("#", "")
       params[:limit] = !params[:limit].blank? ? params[:limit].to_i : 10
       @tags = ActsAsTaggableOn::Tag.autocomplete(params[:q]).limit(params[:limit] - 1)
       prep_tags_for_javascript
 
       respond_to do |format|
-        format.json{
-          render(:json => @tags.to_json, :status => 200)
-        }
+        format.json{ render(:json => @tags.to_json, :status => 200) }
       end
     else
       respond_to do |format|
diff --git a/app/views/templates/header.jst b/app/views/templates/header.jst
index 935a084a71..83845c3752 100644
--- a/app/views/templates/header.jst
+++ b/app/views/templates/header.jst
@@ -5,7 +5,8 @@
   </a>
 
   <div id="global_search">
-    <form accept-charset="UTF-8" action="/people" class="search_form" method="get"><div style="margin:0;padding:0;display:inline"><input name="utf8" type="hidden" value="✓"></div>
+    <form accept-charset="UTF-8" action="/people" class="search_form" method="get">
+      <input name="utf8" type="hidden" value="✓">
       <input id="q" name="q" placeholder="<%= Diaspora.I18n.t('header.search') %>" results="5" type="search" autocomplete="off" class="ac_input">
     </form>
   </div>
diff --git a/features/connects_users.feature b/features/connects_users.feature
index 78889f72d6..4faee4641d 100644
--- a/features/connects_users.feature
+++ b/features/connects_users.feature
@@ -1,7 +1,7 @@
 @javascript
 Feature: following and being followed
 
-  Background: 
+  Background:
     Given a user with email "bob@bob.bob"
     And a user with email "alice@alice.alice"
 
@@ -14,7 +14,7 @@ Feature: following and being followed
     And I fill in "status_message_fake_text" with "I am following you"
     And I press "Share"
     Then I go to the destroy user session page
-    
+
   Scenario: seeing a follower's posts on their profile page, but not in your stream
     When I sign in as "alice@alice.alice"
     And I am on "bob@bob.bob"'s page
@@ -89,15 +89,15 @@ Feature: following and being followed
 
     Then I should see "Besties"
     Then I should see "Mention"
-    Then I should not see "Message"
+    Then I should not see "Message" within "#profile"
 
   Scenario: interacting with the profile page of someone who follows you but who you do not follow
     Given I sign in as "alice@alice.alice"
     And I am on "bob@bob.bob"'s page
 
     Then I should see "Add contact"
-    And I should not see "Mention"
-    And I should not see "Message"
+    Then I should not see "Mention" within "#profile"
+    Then I should not see "Message" within "#profile"
 
   Scenario: interacting with the profile page of someone you follow who also follows you
     Given I sign in as "alice@alice.alice"
diff --git a/features/manages_aspects.feature b/features/manages_aspects.feature
index a8b9473e25..a67d0015d6 100644
--- a/features/manages_aspects.feature
+++ b/features/manages_aspects.feature
@@ -78,14 +78,6 @@ Feature: User manages contacts
     When I follow "Contacts"
     Then I should see "Community Spotlight" within ".span-18"
 
-  Scenario: clicking on the manage aspects link in the right nav with zero contacts directs a user to the featured users page
-    Given I am signed in
-    And I have 0 contacts
-    And I am on the home page
-
-    When I follow "Manage your aspects."
-    Then I should see "Community Spotlight" within ".span-18"
-
   Scenario: clicking on the contacts link in the header with contacts does not send a user to the featured users page
     Given I am signed in
     And I have 2 contacts
diff --git a/features/tags.feature b/features/tags.feature
index b2470b57b8..cf438d97b4 100644
--- a/features/tags.feature
+++ b/features/tags.feature
@@ -11,12 +11,3 @@ Feature: Interacting with tags
     Then I should be on the tag page for "rockstar"
     And I should see "Samuel Beckett"
 
-  @wip
-  Scenario: adding a contact from a tag page
-    When I search for "#rockstar"
-    Then I should see "Add to aspect"
-
-    When I add the person to my "Besties" aspect
-
-    When I search for "#rockstar"
-    Then I should see "generic"
-- 
GitLab