From 0ac28cd9ea2891e21e399d5b23b6b8c5a57c15d2 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Tue, 5 Jul 2011 17:31:49 -0700 Subject: [PATCH] Pending spec for 500 on capital letters --- app/controllers/tag_followings_controller.rb | 2 +- spec/controllers/tag_followings_controller_spec.rb | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) 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