summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-09-18 10:13:16 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2013-09-18 10:13:16 +0000
commit8b794b5e835501aa6ce5707756264a5b65c8a63c (patch)
tree32f1dde8944e6dac8fbd50ee00c5b6262bf6ef5f /test
parentef87b1cee4ab696d18d8bf0baa46c48f94c57a92 (diff)
downloadredmine-8b794b5e835501aa6ce5707756264a5b65c8a63c.tar.gz
redmine-8b794b5e835501aa6ce5707756264a5b65c8a63c.zip
scm: bazaar: add test for author html escaping (#14931)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12148 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test')
-rw-r--r--test/functional/repositories_bazaar_controller_test.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/test/functional/repositories_bazaar_controller_test.rb b/test/functional/repositories_bazaar_controller_test.rb
index 915d9062e..46a71d231 100644
--- a/test/functional/repositories_bazaar_controller_test.rb
+++ b/test/functional/repositories_bazaar_controller_test.rb
@@ -149,6 +149,28 @@ class RepositoriesBazaarControllerTest < ActionController::TestCase
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 &amp;" do
+ assert_select "+ td",
+ :text => "author escaping test"
+ end
+ end
+ end
+ end
+
def test_destroy_valid_repository
@request.session[:user_id] = 1 # admin
assert_equal 0, @repository.changesets.count