@@ -9,7 +9,7 class CalendarsControllerTest < ActionController::TestCase | |||||
9 | assert_template 'calendar' |
|
9 | assert_template 'calendar' | |
10 | assert_not_nil assigns(:calendar) |
|
10 | assert_not_nil assigns(:calendar) | |
11 | end |
|
11 | end | |
12 |
|
12 | |||
13 | def test_cross_project_calendar |
|
13 | def test_cross_project_calendar | |
14 | get :show |
|
14 | get :show | |
15 | assert_response :success |
|
15 | assert_response :success | |
@@ -20,19 +20,19 class CalendarsControllerTest < ActionController::TestCase | |||||
20 | context "GET :show" do |
|
20 | context "GET :show" do | |
21 | should "run custom queries" do |
|
21 | should "run custom queries" do | |
22 | @query = Query.generate_default!(:is_public => true) |
|
22 | @query = Query.generate_default!(:is_public => true) | |
23 |
|
23 | |||
24 | get :show, :query_id => @query.id |
|
24 | get :show, :query_id => @query.id | |
25 | assert_response :success |
|
25 | assert_response :success | |
26 | end |
|
26 | end | |
27 |
|
27 | |||
28 | end |
|
28 | end | |
29 |
|
29 | |||
30 | def test_week_number_calculation |
|
30 | def test_week_number_calculation | |
31 | Setting.start_of_week = 7 |
|
31 | Setting.start_of_week = 7 | |
32 |
|
32 | |||
33 | get :show, :month => '1', :year => '2010' |
|
33 | get :show, :month => '1', :year => '2010' | |
34 | assert_response :success |
|
34 | assert_response :success | |
35 |
|
35 | |||
36 | assert_tag :tag => 'tr', |
|
36 | assert_tag :tag => 'tr', | |
37 | :descendant => {:tag => 'td', |
|
37 | :descendant => {:tag => 'td', | |
38 | :attributes => {:class => 'week-number'}, :content => '53'}, |
|
38 | :attributes => {:class => 'week-number'}, :content => '53'}, |
General Comments 0
You need to be logged in to leave comments.
Login now