Mercurial > hg > soundsoftware-site
comparison test/functional/activities_controller_test.rb @ 909:cbb26bc654de redmine-1.3
Update to Redmine 1.3-stable branch (Redmine SVN rev 8964)
author | Chris Cannam |
---|---|
date | Fri, 24 Feb 2012 19:09:32 +0000 |
parents | cbce1fd3b1b7 |
children | 433d4f72a19b |
comparison
equal
deleted
inserted
replaced
908:c6c2cbd0afee | 909:cbb26bc654de |
---|---|
1 require File.expand_path('../../test_helper', __FILE__) | 1 require File.expand_path('../../test_helper', __FILE__) |
2 | 2 |
3 class ActivitiesControllerTest < ActionController::TestCase | 3 class ActivitiesControllerTest < ActionController::TestCase |
4 fixtures :all | 4 fixtures :projects, :trackers, :issue_statuses, :issues, |
5 :enumerations, :users, :issue_categories, | |
6 :projects_trackers, | |
7 :roles, | |
8 :member_roles, | |
9 :members, | |
10 :groups_users, | |
11 :enabled_modules, | |
12 :workflows, | |
13 :auth_sources, | |
14 :journals, :journal_details | |
15 | |
5 | 16 |
6 def test_project_index | 17 def test_project_index |
7 get :index, :id => 1, :with_subprojects => 0 | 18 get :index, :id => 1, :with_subprojects => 0 |
8 assert_response :success | 19 assert_response :success |
9 assert_template 'index' | 20 assert_template 'index' |
17 :child => { :tag => "a", | 28 :child => { :tag => "a", |
18 :content => /(#{IssueStatus.find(2).name})/, | 29 :content => /(#{IssueStatus.find(2).name})/, |
19 } | 30 } |
20 } | 31 } |
21 } | 32 } |
33 end | |
34 | |
35 def test_project_index_with_invalid_project_id_should_respond_404 | |
36 get :index, :id => 299 | |
37 assert_response 404 | |
22 end | 38 end |
23 | 39 |
24 def test_previous_project_index | 40 def test_previous_project_index |
25 get :index, :id => 1, :from => 3.days.ago.to_date | 41 get :index, :id => 1, :from => 3.days.ago.to_date |
26 assert_response :success | 42 assert_response :success |
73 } | 89 } |
74 } | 90 } |
75 } | 91 } |
76 end | 92 end |
77 | 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 | |
78 def test_index_atom_feed | 99 def test_index_atom_feed |
79 get :index, :format => 'atom' | 100 get :index, :format => 'atom' |
80 assert_response :success | 101 assert_response :success |
81 assert_template 'common/feed.atom.rxml' | 102 assert_template 'common/feed.atom' |
82 assert_tag :tag => 'entry', :child => { | 103 assert_tag :tag => 'entry', :child => { |
83 :tag => 'link', | 104 :tag => 'link', |
84 :attributes => {:href => 'http://test.host/issues/11'}} | 105 :attributes => {:href => 'http://test.host/issues/11'}} |
85 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 | |
86 end | 114 end |