comparison test/functional/journals_controller_test.rb @ 245:051f544170fe

* Update to SVN trunk revision 4993
author Chris Cannam
date Thu, 03 Mar 2011 11:42:28 +0000
parents 8661b858af72
children cbce1fd3b1b7
comparison
equal deleted inserted replaced
244:8972b600f4fb 245:051f544170fe
1 # redMine - project management software 1 # Redmine - project management software
2 # Copyright (C) 2006-2008 Jean-Philippe Lang 2 # Copyright (C) 2006-2011 Jean-Philippe Lang
3 # 3 #
4 # This program is free software; you can redistribute it and/or 4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License 5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2 6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version. 7 # of the License, or (at your option) any later version.
34 def test_index 34 def test_index
35 get :index, :project_id => 1 35 get :index, :project_id => 1
36 assert_response :success 36 assert_response :success
37 assert_not_nil assigns(:journals) 37 assert_not_nil assigns(:journals)
38 assert_equal 'application/atom+xml', @response.content_type 38 assert_equal 'application/atom+xml', @response.content_type
39 end
40
41 def test_diff
42 get :diff, :id => 3, :detail_id => 4
43 assert_response :success
44 assert_template 'diff'
45
46 assert_tag 'span',
47 :attributes => {:class => 'diff_out'},
48 :content => /removed/
49 assert_tag 'span',
50 :attributes => {:class => 'diff_in'},
51 :content => /added/
39 end 52 end
40 53
41 def test_reply_to_issue 54 def test_reply_to_issue
42 @request.session[:user_id] = 2 55 @request.session[:user_id] = 2
43 get :new, :id => 6 56 get :new, :id => 6