Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed gantts_controller/show bug, fixed tagging patch, so similar bug…

…s will not appear
  • Loading branch information...
commit fa054d393fa698b2d78315a5488a1258eb07ea26 1 parent 13c9977
Vladimir Kiselev nettsundere authored
10 lib/tagging_plugin/tagging_patches.rb
View
@@ -160,15 +160,7 @@ def update_with_tags
WikiPage.send(:include, TaggingPlugin::WikiPagePatch) unless WikiPage.included_modules.include? TaggingPlugin::WikiPagePatch
-[
- IssuesController,
- ReportsController,
- WikiController,
- ProjectsController,
- CalendarsController
-].each do |controller|
- controller.send(:include, TaggingPlugin::TaggingHelperPatch) unless controller.include? TaggingPlugin::TaggingHelperPatch
-end
+ApplicationController.send(:include, TaggingPlugin::TaggingHelperPatch) unless ApplicationController.include? TaggingPlugin::TaggingHelperPatch
WikiController.send(:include, TaggingPlugin::WikiControllerPatch) unless WikiController.included_modules.include? TaggingPlugin::WikiControllerPatch
20 test/functional/gantts_controller_test.rb
View
@@ -0,0 +1,20 @@
+require File.dirname(__FILE__) + '/../test_helper'
+
+class GanttsControllerTest < ActionController::TestCase
+ fixtures :projects, :issues, :users, :trackers
+
+ def setup
+ @request.session[:user_id] = 2
+ User.stubs(:current).returns(User.find_by_id(2))
+ User.any_instance.stubs(:allowed_to?).returns(true)
+ Mailer.stubs(:deliver_mail).returns(true)
+ @some_tags = "#1, #2, #3,#4,#5"
+ @issue_with_tags = setup_issue_with_tags(@some_tags)
+ @project_with_tags = @issue_with_tags.project
+ end
+
+ def test_can_show_gantt
+ get :show, :project_id => @project_with_tags.id
+ assert_response :success
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.