summaryrefslogtreecommitdiffstats
path: root/test/functional/activities_controller_test.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-29 19:57:07 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2011-11-29 19:57:07 +0000
commitdd501b1ba30a90b78dbf8674ca541b3f306bc5c5 (patch)
tree48389a9a613956f457d488ec2e9f5985889369a2 /test/functional/activities_controller_test.rb
parentfd24250be09e54fcbfaff1ab524f2d9796835299 (diff)
downloadredmine-dd501b1ba30a90b78dbf8674ca541b3f306bc5c5.tar.gz
redmine-dd501b1ba30a90b78dbf8674ca541b3f306bc5c5.zip
Adds functional tests for ActivitiesController.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7986 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/functional/activities_controller_test.rb')
-rw-r--r--test/functional/activities_controller_test.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb
index 2da92210b..f9d061325 100644
--- a/test/functional/activities_controller_test.rb
+++ b/test/functional/activities_controller_test.rb
@@ -32,6 +32,11 @@ class ActivitiesControllerTest < ActionController::TestCase
}
end
+ def test_project_index_with_invalid_project_id_should_respond_404
+ get :index, :id => 299
+ assert_response 404
+ end
+
def test_previous_project_index
get :index, :id => 1, :from => 3.days.ago.to_date
assert_response :success
@@ -86,6 +91,11 @@ class ActivitiesControllerTest < ActionController::TestCase
}
end
+ def test_user_index_with_invalid_user_id_should_respond_404
+ get :index, :user_id => 299
+ assert_response 404
+ end
+
def test_index_atom_feed
get :index, :format => 'atom'
assert_response :success
@@ -94,4 +104,11 @@ class ActivitiesControllerTest < ActionController::TestCase
:tag => 'link',
:attributes => {:href => 'http://test.host/issues/11'}}
end
+
+ def test_index_atom_feed_with_one_item_type
+ get :index, :format => 'atom', :show_issues => '1'
+ assert_response :success
+ assert_template 'common/feed.atom'
+ assert_tag :tag => 'title', :content => /Issues/
+ end
end