@@ -68,15 +68,18 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||
|
68 | 68 | end |
|
69 | 69 | |
|
70 | 70 | def test_show_at_given_revision |
|
71 | get :show, :id => 3, :path => ['images'], :rev => 0 | |
|
71 | [0, '0', '0885933ad4f6'].each do |r1| | |
|
72 | get :show, :id => 3, :path => ['images'], :rev => r1 | |
|
72 | 73 | assert_response :success |
|
73 | 74 | assert_template 'show' |
|
74 | 75 | assert_not_nil assigns(:entries) |
|
75 | 76 | assert_equal ['delete.png'], assigns(:entries).collect(&:name) |
|
76 | 77 | end |
|
78 | end | |
|
77 | 79 | |
|
78 | 80 | def test_show_directory_sql_escape_percent |
|
79 | get :show, :id => 3, :path => ['sql_escape', 'percent%dir'], :rev => 13 | |
|
81 | [13, '13', '3a330eb32958'].each do |r1| | |
|
82 | get :show, :id => 3, :path => ['sql_escape', 'percent%dir'], :rev => r1 | |
|
80 | 83 | assert_response :success |
|
81 | 84 | assert_template 'show' |
|
82 | 85 | |
@@ -88,6 +91,7 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||
|
88 | 91 | # assert_not_nil changesets |
|
89 | 92 | # assert_equal %w(13 11 10 9), changesets.collect(&:revision) |
|
90 | 93 | end |
|
94 | end | |
|
91 | 95 | |
|
92 | 96 | def test_changes |
|
93 | 97 | get :changes, :id => 3, :path => ['images', 'edit.png'] |
@@ -123,6 +127,7 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||
|
123 | 127 | end |
|
124 | 128 | |
|
125 | 129 | def test_diff |
|
130 | [4, '4', 'def6d2f1254a'].each do |r1| | |
|
126 | 131 | # Full diff of changeset 4 |
|
127 | 132 | get :diff, :id => 3, :rev => 4 |
|
128 | 133 | assert_response :success |
@@ -134,6 +139,7 class RepositoriesMercurialControllerTest < ActionController::TestCase | |||
|
134 | 139 | :attributes => { :class => /diff_out/ }, |
|
135 | 140 | :content => /def remove/ } |
|
136 | 141 | end |
|
142 | end | |
|
137 | 143 | |
|
138 | 144 | def test_annotate |
|
139 | 145 | get :annotate, :id => 3, :path => ['sources', 'watchers_controller.rb'] |
General Comments 0
You need to be logged in to leave comments.
Login now