Sfoglia il codice sorgente

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
tags/1.1.0
Eric Davis 13 anni fa
parent
commit
eabf1ff3e7

+ 2
- 0
app/controllers/calendars_controller.rb Vedi 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

+ 10
- 0
test/functional/calendars_controller_test.rb Vedi 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

Loading…
Annulla
Salva