Merged r12146, r12147 and r12148 from trunk to 2.3-stable (#14931)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@12151 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
55a1869b86
commit
9d3377c92c
BIN
test/fixtures/repositories/bazaar_repository.tar.gz
vendored
BIN
test/fixtures/repositories/bazaar_repository.tar.gz
vendored
Binary file not shown.
@ -23,7 +23,8 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase
|
|||||||
fixtures :projects, :users, :roles, :members, :member_roles,
|
fixtures :projects, :users, :roles, :members, :member_roles,
|
||||||
:repositories, :enabled_modules
|
:repositories, :enabled_modules
|
||||||
|
|
||||||
REPOSITORY_PATH = Rails.root.join('tmp/test/bazaar_repository/trunk').to_s
|
REPOSITORY_PATH = Rails.root.join('tmp/test/bazaar_repository').to_s
|
||||||
|
REPOSITORY_PATH_TRUNK = File.join(REPOSITORY_PATH, "trunk")
|
||||||
PRJ_ID = 3
|
PRJ_ID = 3
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@ -31,7 +32,7 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase
|
|||||||
@project = Project.find(PRJ_ID)
|
@project = Project.find(PRJ_ID)
|
||||||
@repository = Repository::Bazaar.create(
|
@repository = Repository::Bazaar.create(
|
||||||
:project => @project,
|
:project => @project,
|
||||||
:url => REPOSITORY_PATH,
|
:url => REPOSITORY_PATH_TRUNK,
|
||||||
:log_encoding => 'UTF-8')
|
:log_encoding => 'UTF-8')
|
||||||
assert @repository
|
assert @repository
|
||||||
end
|
end
|
||||||
@ -148,6 +149,28 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_annotate_author_escaping
|
||||||
|
repository = Repository::Bazaar.create(
|
||||||
|
:project => @project,
|
||||||
|
:url => File.join(REPOSITORY_PATH, "author_escaping"),
|
||||||
|
:identifier => 'author_escaping',
|
||||||
|
:log_encoding => 'UTF-8')
|
||||||
|
assert repository
|
||||||
|
get :annotate, :id => PRJ_ID, :repository_id => 'author_escaping',
|
||||||
|
:path => repository_path_hash(['author-escaping-test.txt'])[:param]
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'annotate'
|
||||||
|
assert_select "th.line-num", :text => '1' do
|
||||||
|
assert_select "+ td.revision" do
|
||||||
|
assert_select "a", :text => '2'
|
||||||
|
assert_select "+ td.author", :text => "test &" do
|
||||||
|
assert_select "+ td",
|
||||||
|
:text => "author escaping test"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_destroy_valid_repository
|
def test_destroy_valid_repository
|
||||||
@request.session[:user_id] = 1 # admin
|
@request.session[:user_id] = 1 # admin
|
||||||
assert_equal 0, @repository.changesets.count
|
assert_equal 0, @repository.changesets.count
|
||||||
|
Loading…
x
Reference in New Issue
Block a user