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