##// END OF EJS Templates
Adds functional tests for ActivitiesController....
Jean-Philippe Lang -
r7866:dd501b1ba30a
parent child
Show More
@@ -32,6 +32,11 class ActivitiesControllerTest < ActionController::TestCase
32 }
32 }
33 end
33 end
34
34
35 def test_project_index_with_invalid_project_id_should_respond_404
36 get :index, :id => 299
37 assert_response 404
38 end
39
35 def test_previous_project_index
40 def test_previous_project_index
36 get :index, :id => 1, :from => 3.days.ago.to_date
41 get :index, :id => 1, :from => 3.days.ago.to_date
37 assert_response :success
42 assert_response :success
@@ -86,6 +91,11 class ActivitiesControllerTest < ActionController::TestCase
86 }
91 }
87 end
92 end
88
93
94 def test_user_index_with_invalid_user_id_should_respond_404
95 get :index, :user_id => 299
96 assert_response 404
97 end
98
89 def test_index_atom_feed
99 def test_index_atom_feed
90 get :index, :format => 'atom'
100 get :index, :format => 'atom'
91 assert_response :success
101 assert_response :success
@@ -94,4 +104,11 class ActivitiesControllerTest < ActionController::TestCase
94 :tag => 'link',
104 :tag => 'link',
95 :attributes => {:href => 'http://test.host/issues/11'}}
105 :attributes => {:href => 'http://test.host/issues/11'}}
96 end
106 end
107
108 def test_index_atom_feed_with_one_item_type
109 get :index, :format => 'atom', :show_issues => '1'
110 assert_response :success
111 assert_template 'common/feed.atom'
112 assert_tag :tag => 'title', :content => /Issues/
113 end
97 end
114 end
General Comments 0
You need to be logged in to leave comments. Login now