@@ -8,6 +8,8 class CalendarsController < ApplicationController | |||||
8 | helper :projects |
|
8 | helper :projects | |
9 | helper :queries |
|
9 | helper :queries | |
10 | include QueriesHelper |
|
10 | include QueriesHelper | |
|
11 | helper :sort | |||
|
12 | include SortHelper | |||
11 |
|
13 | |||
12 | def show |
|
14 | def show | |
13 | if params[:year] and params[:year].to_i > 1900 |
|
15 | if params[:year] and params[:year].to_i > 1900 |
@@ -16,6 +16,16 class CalendarsControllerTest < ActionController::TestCase | |||||
16 | assert_template 'calendar' |
|
16 | assert_template 'calendar' | |
17 | assert_not_nil assigns(:calendar) |
|
17 | assert_not_nil assigns(:calendar) | |
18 | end |
|
18 | end | |
|
19 | ||||
|
20 | context "GET :show" do | |||
|
21 | should "run custom queries" do | |||
|
22 | @query = Query.generate_default! | |||
|
23 | ||||
|
24 | get :show, :query_id => @query.id | |||
|
25 | assert_response :success | |||
|
26 | end | |||
|
27 | ||||
|
28 | end | |||
19 |
|
29 | |||
20 | def test_week_number_calculation |
|
30 | def test_week_number_calculation | |
21 | Setting.start_of_week = 7 |
|
31 | Setting.start_of_week = 7 |
General Comments 0
You need to be logged in to leave comments.
Login now