@@ -287,6 +287,30 class RepositoriesGitControllerTest < ActionController::TestCase | |||||
287 | end |
|
287 | end | |
288 | end |
|
288 | end | |
289 |
|
289 | |||
|
290 | def test_diff_with_rev_and_path | |||
|
291 | assert_equal 0, @repository.changesets.count | |||
|
292 | @repository.fetch_changesets | |||
|
293 | @project.reload | |||
|
294 | assert_equal NUM_REV, @repository.changesets.count | |||
|
295 | # Full diff of changeset 2f9c0091 | |||
|
296 | ['inline', 'sbs'].each do |dt| | |||
|
297 | get :diff, | |||
|
298 | :id => PRJ_ID, | |||
|
299 | :rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7', | |||
|
300 | :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param], | |||
|
301 | :type => dt | |||
|
302 | assert_response :success | |||
|
303 | assert_template 'diff' | |||
|
304 | # Line 22 removed | |||
|
305 | assert_tag :tag => 'th', | |||
|
306 | :content => '22', | |||
|
307 | :sibling => { :tag => 'td', | |||
|
308 | :attributes => { :class => /diff_out/ }, | |||
|
309 | :content => /def remove/ } | |||
|
310 | assert_tag :tag => 'h2', :content => /2f9c0091/ | |||
|
311 | end | |||
|
312 | end | |||
|
313 | ||||
290 | def test_diff_truncated |
|
314 | def test_diff_truncated | |
291 | assert_equal 0, @repository.changesets.count |
|
315 | assert_equal 0, @repository.changesets.count | |
292 | @repository.fetch_changesets |
|
316 | @repository.fetch_changesets |
General Comments 0
You need to be logged in to leave comments.
Login now