mirror of
https://github.com/meineerde/redmine.git
synced 2026-04-03 14:31:38 +00:00
Merged r10245 from trunk to 2.0-stable (#11752)
scm: git: add functional test of diff with revision and path. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.0-stable@10272 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e573b0455b
commit
d9dfa7b2b6
@ -287,6 +287,30 @@ class RepositoriesGitControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_diff_with_rev_and_path
|
||||||
|
assert_equal 0, @repository.changesets.count
|
||||||
|
@repository.fetch_changesets
|
||||||
|
@project.reload
|
||||||
|
assert_equal NUM_REV, @repository.changesets.count
|
||||||
|
# Full diff of changeset 2f9c0091
|
||||||
|
['inline', 'sbs'].each do |dt|
|
||||||
|
get :diff,
|
||||||
|
:id => PRJ_ID,
|
||||||
|
:rev => '2f9c0091c754a91af7a9c478e36556b4bde8dcf7',
|
||||||
|
:path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
|
||||||
|
:type => dt
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'diff'
|
||||||
|
# Line 22 removed
|
||||||
|
assert_tag :tag => 'th',
|
||||||
|
:content => '22',
|
||||||
|
:sibling => { :tag => 'td',
|
||||||
|
:attributes => { :class => /diff_out/ },
|
||||||
|
:content => /def remove/ }
|
||||||
|
assert_tag :tag => 'h2', :content => /2f9c0091/
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_diff_truncated
|
def test_diff_truncated
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
@repository.fetch_changesets
|
@repository.fetch_changesets
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user