|
1 | NO CONTENT: modified file, binary diff hidden |
@@ -23,7 +23,8 class RepositoriesBazaarControllerTest < ActionController::TestCase | |||
|
23 | 23 | fixtures :projects, :users, :roles, :members, :member_roles, |
|
24 | 24 | :repositories, :enabled_modules |
|
25 | 25 | |
|
26 |
REPOSITORY_PATH = Rails.root.join('tmp/test/bazaar_repository |
|
|
26 | REPOSITORY_PATH = Rails.root.join('tmp/test/bazaar_repository').to_s | |
|
27 | REPOSITORY_PATH_TRUNK = File.join(REPOSITORY_PATH, "trunk") | |
|
27 | 28 | PRJ_ID = 3 |
|
28 | 29 | |
|
29 | 30 | def setup |
@@ -31,7 +32,7 class RepositoriesBazaarControllerTest < ActionController::TestCase | |||
|
31 | 32 | @project = Project.find(PRJ_ID) |
|
32 | 33 | @repository = Repository::Bazaar.create( |
|
33 | 34 | :project => @project, |
|
34 | :url => REPOSITORY_PATH, | |
|
35 | :url => REPOSITORY_PATH_TRUNK, | |
|
35 | 36 | :log_encoding => 'UTF-8') |
|
36 | 37 | assert @repository |
|
37 | 38 | end |
@@ -148,6 +149,28 class RepositoriesBazaarControllerTest < ActionController::TestCase | |||
|
148 | 149 | end |
|
149 | 150 | end |
|
150 | 151 | |
|
152 | def test_annotate_author_escaping | |
|
153 | repository = Repository::Bazaar.create( | |
|
154 | :project => @project, | |
|
155 | :url => File.join(REPOSITORY_PATH, "author_escaping"), | |
|
156 | :identifier => 'author_escaping', | |
|
157 | :log_encoding => 'UTF-8') | |
|
158 | assert repository | |
|
159 | get :annotate, :id => PRJ_ID, :repository_id => 'author_escaping', | |
|
160 | :path => repository_path_hash(['author-escaping-test.txt'])[:param] | |
|
161 | assert_response :success | |
|
162 | assert_template 'annotate' | |
|
163 | assert_select "th.line-num", :text => '1' do | |
|
164 | assert_select "+ td.revision" do | |
|
165 | assert_select "a", :text => '2' | |
|
166 | assert_select "+ td.author", :text => "test &" do | |
|
167 | assert_select "+ td", | |
|
168 | :text => "author escaping test" | |
|
169 | end | |
|
170 | end | |
|
171 | end | |
|
172 | end | |
|
173 | ||
|
151 | 174 | def test_destroy_valid_repository |
|
152 | 175 | @request.session[:user_id] = 1 # admin |
|
153 | 176 | assert_equal 0, @repository.changesets.count |
General Comments 0
You need to be logged in to leave comments.
Login now