@@ -8,8 +8,8 class ActivitiesControllerTest < ActionController::TestCase | |||||
8 | assert_response :success |
|
8 | assert_response :success | |
9 | assert_template 'index' |
|
9 | assert_template 'index' | |
10 | assert_not_nil assigns(:events_by_day) |
|
10 | assert_not_nil assigns(:events_by_day) | |
11 |
|
11 | |||
12 |
assert_tag :tag => "h3", |
|
12 | assert_tag :tag => "h3", | |
13 | :content => /#{2.days.ago.to_date.day}/, |
|
13 | :content => /#{2.days.ago.to_date.day}/, | |
14 | :sibling => { :tag => "dl", |
|
14 | :sibling => { :tag => "dl", | |
15 | :child => { :tag => "dt", |
|
15 | :child => { :tag => "dt", | |
@@ -20,14 +20,14 class ActivitiesControllerTest < ActionController::TestCase | |||||
20 | } |
|
20 | } | |
21 | } |
|
21 | } | |
22 | end |
|
22 | end | |
23 |
|
23 | |||
24 | def test_previous_project_index |
|
24 | def test_previous_project_index | |
25 | get :index, :id => 1, :from => 3.days.ago.to_date |
|
25 | get :index, :id => 1, :from => 3.days.ago.to_date | |
26 | assert_response :success |
|
26 | assert_response :success | |
27 | assert_template 'index' |
|
27 | assert_template 'index' | |
28 | assert_not_nil assigns(:events_by_day) |
|
28 | assert_not_nil assigns(:events_by_day) | |
29 |
|
29 | |||
30 |
assert_tag :tag => "h3", |
|
30 | assert_tag :tag => "h3", | |
31 | :content => /#{3.day.ago.to_date.day}/, |
|
31 | :content => /#{3.day.ago.to_date.day}/, | |
32 | :sibling => { :tag => "dl", |
|
32 | :sibling => { :tag => "dl", | |
33 | :child => { :tag => "dt", |
|
33 | :child => { :tag => "dt", | |
@@ -38,14 +38,14 class ActivitiesControllerTest < ActionController::TestCase | |||||
38 | } |
|
38 | } | |
39 | } |
|
39 | } | |
40 | end |
|
40 | end | |
41 |
|
41 | |||
42 | def test_global_index |
|
42 | def test_global_index | |
43 | get :index |
|
43 | get :index | |
44 | assert_response :success |
|
44 | assert_response :success | |
45 | assert_template 'index' |
|
45 | assert_template 'index' | |
46 | assert_not_nil assigns(:events_by_day) |
|
46 | assert_not_nil assigns(:events_by_day) | |
47 |
|
47 | |||
48 |
assert_tag :tag => "h3", |
|
48 | assert_tag :tag => "h3", | |
49 | :content => /#{5.day.ago.to_date.day}/, |
|
49 | :content => /#{5.day.ago.to_date.day}/, | |
50 | :sibling => { :tag => "dl", |
|
50 | :sibling => { :tag => "dl", | |
51 | :child => { :tag => "dt", |
|
51 | :child => { :tag => "dt", | |
@@ -56,14 +56,14 class ActivitiesControllerTest < ActionController::TestCase | |||||
56 | } |
|
56 | } | |
57 | } |
|
57 | } | |
58 | end |
|
58 | end | |
59 |
|
59 | |||
60 | def test_user_index |
|
60 | def test_user_index | |
61 | get :index, :user_id => 2 |
|
61 | get :index, :user_id => 2 | |
62 | assert_response :success |
|
62 | assert_response :success | |
63 | assert_template 'index' |
|
63 | assert_template 'index' | |
64 | assert_not_nil assigns(:events_by_day) |
|
64 | assert_not_nil assigns(:events_by_day) | |
65 |
|
65 | |||
66 |
assert_tag :tag => "h3", |
|
66 | assert_tag :tag => "h3", | |
67 | :content => /#{3.day.ago.to_date.day}/, |
|
67 | :content => /#{3.day.ago.to_date.day}/, | |
68 | :sibling => { :tag => "dl", |
|
68 | :sibling => { :tag => "dl", | |
69 | :child => { :tag => "dt", |
|
69 | :child => { :tag => "dt", | |
@@ -74,7 +74,7 class ActivitiesControllerTest < ActionController::TestCase | |||||
74 | } |
|
74 | } | |
75 | } |
|
75 | } | |
76 | end |
|
76 | end | |
77 |
|
77 | |||
78 | def test_index_atom_feed |
|
78 | def test_index_atom_feed | |
79 | get :index, :format => 'atom' |
|
79 | get :index, :format => 'atom' | |
80 | assert_response :success |
|
80 | assert_response :success | |
@@ -83,5 +83,4 class ActivitiesControllerTest < ActionController::TestCase | |||||
83 | :tag => 'link', |
|
83 | :tag => 'link', | |
84 | :attributes => {:href => 'http://test.host/issues/11'}} |
|
84 | :attributes => {:href => 'http://test.host/issues/11'}} | |
85 | end |
|
85 | end | |
86 |
|
||||
87 | end |
|
86 | end |
General Comments 0
You need to be logged in to leave comments.
Login now