Mercurial > hg > soundsoftware-site
comparison test/functional/journals_controller_test.rb @ 119:8661b858af72
* Update to Redmine trunk rev 4705
author | Chris Cannam |
---|---|
date | Thu, 13 Jan 2011 14:12:06 +0000 |
parents | 1d32c0a0efbf |
children | 051f544170fe |
comparison
equal
deleted
inserted
replaced
39:150ceac17a8d | 119:8661b858af72 |
---|---|
13 # | 13 # |
14 # You should have received a copy of the GNU General Public License | 14 # You should have received a copy of the GNU General Public License |
15 # along with this program; if not, write to the Free Software | 15 # along with this program; if not, write to the Free Software |
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | 17 |
18 require File.dirname(__FILE__) + '/../test_helper' | 18 require File.expand_path('../../test_helper', __FILE__) |
19 require 'journals_controller' | 19 require 'journals_controller' |
20 | 20 |
21 # Re-raise errors caught by the controller. | 21 # Re-raise errors caught by the controller. |
22 class JournalsController; def rescue_action(e) raise e end; end | 22 class JournalsController; def rescue_action(e) raise e end; end |
23 | 23 |
38 assert_equal 'application/atom+xml', @response.content_type | 38 assert_equal 'application/atom+xml', @response.content_type |
39 end | 39 end |
40 | 40 |
41 def test_reply_to_issue | 41 def test_reply_to_issue |
42 @request.session[:user_id] = 2 | 42 @request.session[:user_id] = 2 |
43 get :new, :id => 1 | 43 get :new, :id => 6 |
44 assert_response :success | 44 assert_response :success |
45 assert_select_rjs :show, "update" | 45 assert_select_rjs :show, "update" |
46 end | |
47 | |
48 def test_reply_to_issue_without_permission | |
49 @request.session[:user_id] = 7 | |
50 get :new, :id => 6 | |
51 assert_response 403 | |
46 end | 52 end |
47 | 53 |
48 def test_reply_to_note | 54 def test_reply_to_note |
49 @request.session[:user_id] = 2 | 55 @request.session[:user_id] = 2 |
50 get :new, :id => 1, :journal_id => 2 | 56 get :new, :id => 6, :journal_id => 4 |
51 assert_response :success | 57 assert_response :success |
52 assert_select_rjs :show, "update" | 58 assert_select_rjs :show, "update" |
53 end | 59 end |
54 | 60 |
55 def test_get_edit | 61 def test_get_edit |