]> source.dussan.org Git - redmine.git/commitdiff
Add SortHelper so custom queries will run on the Calendar. #6612
authorEric Davis <edavis@littlestreamsoftware.com>
Sun, 10 Oct 2010 21:17:10 +0000 (21:17 +0000)
committerEric Davis <edavis@littlestreamsoftware.com>
Sun, 10 Oct 2010 21:17:10 +0000 (21:17 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4245 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/calendars_controller.rb
test/functional/calendars_controller_test.rb

index febacd0757d25f29f636e0ae5f596632dcd1e109..4544b3399705da1e443d80b050773d057935ad29 100644 (file)
@@ -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
index ad047c6690e9879b9bb053fd72cb33037681fe19..3fb9ad1f0f07820799a28e5f09de2aa2508df72a 100644 (file)
@@ -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