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

* Update to SVN trunk revision 4993
author Chris Cannam
date Thu, 03 Mar 2011 11:42:28 +0000
parents 0579821a129a
children eeebe205a056 cbce1fd3b1b7
comparison
equal deleted inserted replaced
244:8972b600f4fb 245:051f544170fe
32 @request = ActionController::TestRequest.new 32 @request = ActionController::TestRequest.new
33 @response = ActionController::TestResponse.new 33 @response = ActionController::TestResponse.new
34 User.current = nil 34 User.current = nil
35 @repository = Repository::Mercurial.create(:project => Project.find(3), :url => REPOSITORY_PATH) 35 @repository = Repository::Mercurial.create(:project => Project.find(3), :url => REPOSITORY_PATH)
36 assert @repository 36 assert @repository
37 @diff_c_support = true
37 end 38 end
38 39
39 if File.directory?(REPOSITORY_PATH) 40 if File.directory?(REPOSITORY_PATH)
40 def test_show 41 def test_show
41 get :show, :id => 3 42 get :show, :id => 3
135 # Full diff of changeset 4 136 # Full diff of changeset 4
136 get :diff, :id => 3, :rev => r1 137 get :diff, :id => 3, :rev => r1
137 assert_response :success 138 assert_response :success
138 assert_template 'diff' 139 assert_template 'diff'
139 140
140 if @repository.scm.class.client_version_above?([1, 2]) 141 if @diff_c_support
141 # Line 22 removed 142 # Line 22 removed
142 assert_tag :tag => 'th', 143 assert_tag :tag => 'th',
143 :content => '22', 144 :content => '22',
144 :sibling => { :tag => 'td', 145 :sibling => { :tag => 'td',
145 :attributes => { :class => /diff_out/ }, 146 :attributes => { :class => /diff_out/ },