@@ -217,34 +217,19 class RepositoriesCvsControllerTest < ActionController::TestCase | |||||
217 | :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param] |
|
217 | :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param] | |
218 | assert_response :success |
|
218 | assert_response :success | |
219 | assert_template 'annotate' |
|
219 | assert_template 'annotate' | |
|
220 | ||||
220 | # 1.1 line |
|
221 | # 1.1 line | |
221 |
assert_t |
|
222 | assert_select 'tr' do | |
222 | :attributes => { :class => 'line-num' }, |
|
223 | assert_select 'th.line-num', :text => '21' | |
223 | :content => '21', |
|
224 | assert_select 'td.revision', :text => /1.1/ | |
224 | :sibling => { |
|
225 | assert_select 'td.author', :text => /LANG/ | |
225 | :tag => 'td', |
|
226 | end | |
226 | :attributes => { :class => 'revision' }, |
|
|||
227 | :content => /1.1/, |
|
|||
228 | :sibling => { |
|
|||
229 | :tag => 'td', |
|
|||
230 | :attributes => { :class => 'author' }, |
|
|||
231 | :content => /LANG/ |
|
|||
232 | } |
|
|||
233 | } |
|
|||
234 | # 1.2 line |
|
227 | # 1.2 line | |
235 |
assert_t |
|
228 | assert_select 'tr' do | |
236 | :attributes => { :class => 'line-num' }, |
|
229 | assert_select 'th.line-num', :text => '32' | |
237 | :content => '32', |
|
230 | assert_select 'td.revision', :text => /1.2/ | |
238 | :sibling => { |
|
231 | assert_select 'td.author', :text => /LANG/ | |
239 | :tag => 'td', |
|
232 | end | |
240 | :attributes => { :class => 'revision' }, |
|
|||
241 | :content => /1.2/, |
|
|||
242 | :sibling => { |
|
|||
243 | :tag => 'td', |
|
|||
244 | :attributes => { :class => 'author' }, |
|
|||
245 | :content => /LANG/ |
|
|||
246 | } |
|
|||
247 | } |
|
|||
248 | end |
|
233 | end | |
249 |
|
234 | |||
250 | def test_destroy_valid_repository |
|
235 | def test_destroy_valid_repository |
@@ -383,27 +383,14 class RepositoriesGitControllerTest < ActionController::TestCase | |||||
383 | :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param] |
|
383 | :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param] | |
384 | assert_response :success |
|
384 | assert_response :success | |
385 | assert_template 'annotate' |
|
385 | assert_template 'annotate' | |
|
386 | ||||
386 | # Line 23, changeset 2f9c0091 |
|
387 | # Line 23, changeset 2f9c0091 | |
387 | assert_tag :tag => 'th', :content => '23', |
|
388 | assert_select 'tr' do | |
388 | :sibling => { |
|
389 | assert_select 'th.line-num', :text => '23' | |
389 | :tag => 'td', |
|
390 | assert_select 'td.revision', :text => /2f9c0091/ | |
390 | :child => { |
|
391 | assert_select 'td.author', :text => 'jsmith' | |
391 | :tag => 'a', |
|
392 | assert_select 'td', :text => /remove_watcher/ | |
392 | :content => /2f9c0091/ |
|
393 | end | |
393 | } |
|
|||
394 | } |
|
|||
395 | assert_tag :tag => 'th', :content => '23', |
|
|||
396 | :sibling => { :tag => 'td', :content => /jsmith/ } |
|
|||
397 | assert_tag :tag => 'th', :content => '23', |
|
|||
398 | :sibling => { |
|
|||
399 | :tag => 'td', |
|
|||
400 | :child => { |
|
|||
401 | :tag => 'a', |
|
|||
402 | :content => /2f9c0091/ |
|
|||
403 | } |
|
|||
404 | } |
|
|||
405 | assert_tag :tag => 'th', :content => '23', |
|
|||
406 | :sibling => { :tag => 'td', :content => /remove_watcher/ } |
|
|||
407 | end |
|
394 | end | |
408 |
|
395 | |||
409 | def test_annotate_at_given_revision |
|
396 | def test_annotate_at_given_revision |
@@ -376,29 +376,14 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||||
376 | :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param] |
|
376 | :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param] | |
377 | assert_response :success |
|
377 | assert_response :success | |
378 | assert_template 'annotate' |
|
378 | assert_template 'annotate' | |
|
379 | ||||
379 | # Line 22, revision 4:def6d2f1254a |
|
380 | # Line 22, revision 4:def6d2f1254a | |
380 |
assert_t |
|
381 | assert_select 'tr' do | |
381 | :content => '22', |
|
382 | assert_select 'th.line-num', :text => '22' | |
382 | :attributes => { :class => 'line-num' }, |
|
383 | assert_select 'td.revision', :text => '4:def6d2f1254a' | |
383 | :sibling => |
|
384 | assert_select 'td.author', :text => 'jsmith' | |
384 | { |
|
385 | assert_select 'td', :text => /remove_watcher/ | |
385 | :tag => 'td', |
|
386 | end | |
386 | :attributes => { :class => 'revision' }, |
|
|||
387 | :child => { :tag => 'a', :content => '4:def6d2f1254a' } |
|
|||
388 | } |
|
|||
389 | assert_tag :tag => 'th', |
|
|||
390 | :content => '22', |
|
|||
391 | :attributes => { :class => 'line-num' }, |
|
|||
392 | :sibling => |
|
|||
393 | { |
|
|||
394 | :tag => 'td' , |
|
|||
395 | :content => 'jsmith' , |
|
|||
396 | :attributes => { :class => 'author' }, |
|
|||
397 | } |
|
|||
398 | assert_tag :tag => 'th', |
|
|||
399 | :content => '22', |
|
|||
400 | :attributes => { :class => 'line-num' }, |
|
|||
401 | :sibling => { :tag => 'td', :content => /remove_watcher/ } |
|
|||
402 | end |
|
387 | end | |
403 |
|
388 | |||
404 | def test_annotate_not_in_tip |
|
389 | def test_annotate_not_in_tip |
General Comments 0
You need to be logged in to leave comments.
Login now