From fe97436f81be6177467cee61eddbd8db908a5479 Mon Sep 17 00:00:00 2001 From: albert Date: Mon, 11 Mar 2013 18:12:27 -0400 Subject: [PATCH] fix tests --- app/controllers/post_versions_controller.rb | 1 + test/unit/tag_subscription_test.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/post_versions_controller.rb b/app/controllers/post_versions_controller.rb index 0a00d8b56..e607f40df 100644 --- a/app/controllers/post_versions_controller.rb +++ b/app/controllers/post_versions_controller.rb @@ -1,5 +1,6 @@ class PostVersionsController < ApplicationController respond_to :html, :xml, :json + rescue_from ActiveRecord::StatementInvalid, :with => :rescue_exception def index @post_versions = PostVersion.search(params[:search]).order("updated_at desc").paginate(params[:page], :search_count => params[:search]) diff --git a/test/unit/tag_subscription_test.rb b/test/unit/tag_subscription_test.rb index 939718e33..0c7131020 100644 --- a/test/unit/tag_subscription_test.rb +++ b/test/unit/tag_subscription_test.rb @@ -23,7 +23,7 @@ class TagSubscriptionTest < ActiveSupport::TestCase should "fail" do sub = FactoryGirl.build(:tag_subscription, :tag_query => "aaa bbb", :creator => @user, :name => "zzz") sub.save - assert_equal(["Creator can subscribe up to 0 tags"], sub.errors.full_messages) + assert_equal(["You can create up to 0 tag subscriptions"], sub.errors.full_messages) end end