@@ -50,9 +50,9 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||||
50 | assert_template 'show' |
|
50 | assert_template 'show' | |
51 | assert_not_nil assigns(:entries) |
|
51 | assert_not_nil assigns(:entries) | |
52 | assert_equal 3, assigns(:entries).size |
|
52 | assert_equal 3, assigns(:entries).size | |
53 | assert assigns(:entries).detect {|e| e.name == 'images' && e.kind == 'dir'} |
|
53 | assert assigns(:entries).detect {|e| e.name == 'images' && e.kind == 'dir'} | |
54 | assert assigns(:entries).detect {|e| e.name == 'sources' && e.kind == 'dir'} |
|
54 | assert assigns(:entries).detect {|e| e.name == 'sources' && e.kind == 'dir'} | |
55 | assert assigns(:entries).detect {|e| e.name == 'README' && e.kind == 'file'} |
|
55 | assert assigns(:entries).detect {|e| e.name == 'README' && e.kind == 'file'} | |
56 | end |
|
56 | end | |
57 |
|
57 | |||
58 | def test_show_directory |
|
58 | def test_show_directory | |
@@ -86,10 +86,10 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||||
86 | get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'] |
|
86 | get :entry, :id => 3, :path => ['sources', 'watchers_controller.rb'] | |
87 | assert_response :success |
|
87 | assert_response :success | |
88 | assert_template 'entry' |
|
88 | assert_template 'entry' | |
89 |
# Line 1 |
|
89 | # Line 10 | |
90 | assert_tag :tag => 'th', |
|
90 | assert_tag :tag => 'th', | |
91 |
:content => |
|
91 | :content => '10', | |
92 |
:attributes => { :class => |
|
92 | :attributes => { :class => 'line-num' }, | |
93 | :sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ } |
|
93 | :sibling => { :tag => 'td', :content => /WITHOUT ANY WARRANTY/ } | |
94 | end |
|
94 | end | |
95 |
|
95 | |||
@@ -115,7 +115,7 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||||
115 | assert_template 'diff' |
|
115 | assert_template 'diff' | |
116 | # Line 22 removed |
|
116 | # Line 22 removed | |
117 | assert_tag :tag => 'th', |
|
117 | assert_tag :tag => 'th', | |
118 |
:content => |
|
118 | :content => '22', | |
119 | :sibling => { :tag => 'td', |
|
119 | :sibling => { :tag => 'td', | |
120 | :attributes => { :class => /diff_out/ }, |
|
120 | :attributes => { :class => /diff_out/ }, | |
121 | :content => /def remove/ } |
|
121 | :content => /def remove/ } |
General Comments 0
You need to be logged in to leave comments.
Login now