##// END OF EJS Templates
Rails3: test: scm: cvs: use "repository_path_hash" for path param...
Toshi MARUYAMA -
r8806:00ec4e189fb1
parent child
Show More
@@ -79,7 +79,7 class RepositoriesCvsControllerTest < ActionController::TestCase
79 79 @repository.fetch_changesets
80 80 @project.reload
81 81 assert_equal NUM_REV, @repository.changesets.count
82 get :show, :id => PRJ_ID, :path => ['images']
82 get :show, :id => PRJ_ID, :path => repository_path_hash(['images'])[:param]
83 83 assert_response :success
84 84 assert_template 'show'
85 85 assert_not_nil assigns(:entries)
@@ -95,7 +95,8 class RepositoriesCvsControllerTest < ActionController::TestCase
95 95 @repository.fetch_changesets
96 96 @project.reload
97 97 assert_equal NUM_REV, @repository.changesets.count
98 get :show, :id => PRJ_ID, :path => ['images'], :rev => 1
98 get :show, :id => PRJ_ID, :path => repository_path_hash(['images'])[:param],
99 :rev => 1
99 100 assert_response :success
100 101 assert_template 'show'
101 102 assert_not_nil assigns(:entries)
@@ -107,7 +108,8 class RepositoriesCvsControllerTest < ActionController::TestCase
107 108 @repository.fetch_changesets
108 109 @project.reload
109 110 assert_equal NUM_REV, @repository.changesets.count
110 get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb']
111 get :entry, :id => PRJ_ID,
112 :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
111 113 assert_response :success
112 114 assert_template 'entry'
113 115 assert_no_tag :tag => 'td',
@@ -121,7 +123,9 class RepositoriesCvsControllerTest < ActionController::TestCase
121 123 @repository.fetch_changesets
122 124 @project.reload
123 125 assert_equal NUM_REV, @repository.changesets.count
124 get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'], :rev => 2
126 get :entry, :id => PRJ_ID,
127 :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
128 :rev => 2
125 129 assert_response :success
126 130 assert_template 'entry'
127 131 # this line was removed in r3
@@ -135,7 +139,8 class RepositoriesCvsControllerTest < ActionController::TestCase
135 139 @repository.fetch_changesets
136 140 @project.reload
137 141 assert_equal NUM_REV, @repository.changesets.count
138 get :entry, :id => PRJ_ID, :path => ['sources', 'zzz.c']
142 get :entry, :id => PRJ_ID,
143 :path => repository_path_hash(['sources', 'zzz.c'])[:param]
139 144 assert_tag :tag => 'p',
140 145 :attributes => { :id => /errorExplanation/ },
141 146 :content => /The entry or revision was not found in the repository/
@@ -146,7 +151,8 class RepositoriesCvsControllerTest < ActionController::TestCase
146 151 @repository.fetch_changesets
147 152 @project.reload
148 153 assert_equal NUM_REV, @repository.changesets.count
149 get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb'],
154 get :entry, :id => PRJ_ID,
155 :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param],
150 156 :format => 'raw'
151 157 assert_response :success
152 158 end
@@ -156,7 +162,8 class RepositoriesCvsControllerTest < ActionController::TestCase
156 162 @repository.fetch_changesets
157 163 @project.reload
158 164 assert_equal NUM_REV, @repository.changesets.count
159 get :entry, :id => PRJ_ID, :path => ['sources']
165 get :entry, :id => PRJ_ID,
166 :path => repository_path_hash(['sources'])[:param]
160 167 assert_response :success
161 168 assert_template 'show'
162 169 assert_not_nil assigns(:entry)
@@ -206,7 +213,8 class RepositoriesCvsControllerTest < ActionController::TestCase
206 213 @repository.fetch_changesets
207 214 @project.reload
208 215 assert_equal NUM_REV, @repository.changesets.count
209 get :annotate, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb']
216 get :annotate, :id => PRJ_ID,
217 :path => repository_path_hash(['sources', 'watchers_controller.rb'])[:param]
210 218 assert_response :success
211 219 assert_template 'annotate'
212 220 # 1.1 line
General Comments 0
You need to be logged in to leave comments. Login now