summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Davis <edavis@littlestreamsoftware.com>2010-10-10 21:17:10 +0000
committerEric Davis <edavis@littlestreamsoftware.com>2010-10-10 21:17:10 +0000
commiteabf1ff3e703609f4ec80d98a2f56a91674fdcbc (patch)
treefd7efa6566ee18d193558e5e4c6a1abc27b7cfe1
parent4acd990ee2950a575a35b32bdfd8a75f04e958b0 (diff)
downloadredmine-eabf1ff3e703609f4ec80d98a2f56a91674fdcbc.tar.gz
redmine-eabf1ff3e703609f4ec80d98a2f56a91674fdcbc.zip
Add SortHelper so custom queries will run on the Calendar. #6612
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4245 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/controllers/calendars_controller.rb2
-rw-r--r--test/functional/calendars_controller_test.rb10
2 files changed, 12 insertions, 0 deletions
diff --git a/app/controllers/calendars_controller.rb b/app/controllers/calendars_controller.rb
index febacd075..4544b3399 100644
--- a/app/controllers/calendars_controller.rb
+++ b/app/controllers/calendars_controller.rb
@@ -8,6 +8,8 @@ class CalendarsController < ApplicationController
helper :projects
helper :queries
include QueriesHelper
+ helper :sort
+ include SortHelper
def show
if params[:year] and params[:year].to_i > 1900
diff --git a/test/functional/calendars_controller_test.rb b/test/functional/calendars_controller_test.rb
index ad047c669..3fb9ad1f0 100644
--- a/test/functional/calendars_controller_test.rb
+++ b/test/functional/calendars_controller_test.rb
@@ -16,6 +16,16 @@ class CalendarsControllerTest < ActionController::TestCase
assert_template 'calendar'
assert_not_nil assigns(:calendar)
end
+
+ context "GET :show" do
+ should "run custom queries" do
+ @query = Query.generate_default!
+
+ get :show, :query_id => @query.id
+ assert_response :success
+ end
+
+ end
def test_week_number_calculation
Setting.start_of_week = 7