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