diff --git a/app/controllers/tag_followings_controller.rb b/app/controllers/tag_followings_controller.rb index 2883f501d..61ba13a74 100644 --- a/app/controllers/tag_followings_controller.rb +++ b/app/controllers/tag_followings_controller.rb @@ -8,7 +8,7 @@ class TagFollowingsController < ApplicationController @tag_following = current_user.tag_followings.new(:tag_id => @tag.id) if @tag_following.save - flash[:notice] = I18n.t('tag_followings.create.success', :name => params[:name]) + flash[:notice] = I18n.t('tag_followings.create.success', :name => params[:name]) else flash[:error] = I18n.t('tag_followings.create.failure', :name => params[:name]) end diff --git a/spec/controllers/tag_followings_controller_spec.rb b/spec/controllers/tag_followings_controller_spec.rb index 60dfb6bdc..e8660f3c0 100644 --- a/spec/controllers/tag_followings_controller_spec.rb +++ b/spec/controllers/tag_followings_controller_spec.rb @@ -55,6 +55,12 @@ describe TagFollowingsController do response.should redirect_to(tag_path(:name => valid_attributes[:name])) flash[:error].should == "Failed to follow: ##{valid_attributes[:name]}" end + + it 'downcases the tag name' do + pending "THIS CAUSES A 500 WE NEED TO FIX IT" + post "tags/#{valid_attributes[:name].upcase}/tag_followings" + assigns[:tag].should == @tag + end end end