Skip to content

Commit

Permalink
Fixed calendar/show bug
Browse files Browse the repository at this point in the history
  • Loading branch information
nettsundere committed Dec 28, 2012
1 parent eb346ee commit 13c9977
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/tagging_plugin/tagging_patches.rb
Expand Up @@ -160,7 +160,13 @@ def update_with_tags

WikiPage.send(:include, TaggingPlugin::WikiPagePatch) unless WikiPage.included_modules.include? TaggingPlugin::WikiPagePatch

[IssuesController, ReportsController, WikiController, ProjectsController].each do |controller|
[
IssuesController,
ReportsController,
WikiController,
ProjectsController,
CalendarsController
].each do |controller|
controller.send(:include, TaggingPlugin::TaggingHelperPatch) unless controller.include? TaggingPlugin::TaggingHelperPatch
end

Expand Down
20 changes: 20 additions & 0 deletions test/functional/calendars_controller_test.rb
@@ -0,0 +1,20 @@
require File.dirname(__FILE__) + '/../test_helper'

class CalendarsControllerTest < 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_calendar
get :show, :project_id => @project_with_tags.id
assert_response :success
end
end

0 comments on commit 13c9977

Please sign in to comment.