##// END OF EJS Templates
scm: cvs: code clean up functional test....
Toshi MARUYAMA -
r5332:a20f140734e4
parent child
Show More
@@ -96,7 +96,8 class RepositoriesCvsControllerTest < ActionController::TestCase
96 get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb']
96 get :entry, :id => PRJ_ID, :path => ['sources', 'watchers_controller.rb']
97 assert_response :success
97 assert_response :success
98 assert_template 'entry'
98 assert_template 'entry'
99 assert_no_tag :tag => 'td', :attributes => { :class => /line-code/},
99 assert_no_tag :tag => 'td',
100 :attributes => { :class => /line-code/},
100 :content => /before_filter/
101 :content => /before_filter/
101 end
102 end
102
103
@@ -108,7 +109,8 class RepositoriesCvsControllerTest < ActionController::TestCase
108 assert_response :success
109 assert_response :success
109 assert_template 'entry'
110 assert_template 'entry'
110 # this line was removed in r3
111 # this line was removed in r3
111 assert_tag :tag => 'td', :attributes => { :class => /line-code/},
112 assert_tag :tag => 'td',
113 :attributes => { :class => /line-code/},
112 :content => /before_filter/
114 :content => /before_filter/
113 end
115 end
114
116
@@ -116,7 +118,8 class RepositoriesCvsControllerTest < ActionController::TestCase
116 @repository.fetch_changesets
118 @repository.fetch_changesets
117 @repository.reload
119 @repository.reload
118 get :entry, :id => PRJ_ID, :path => ['sources', 'zzz.c']
120 get :entry, :id => PRJ_ID, :path => ['sources', 'zzz.c']
119 assert_tag :tag => 'p', :attributes => { :id => /errorExplanation/ },
121 assert_tag :tag => 'p',
122 :attributes => { :id => /errorExplanation/ },
120 :content => /The entry or revision was not found in the repository/
123 :content => /The entry or revision was not found in the repository/
121 end
124 end
122
125
@@ -174,20 +177,30 class RepositoriesCvsControllerTest < ActionController::TestCase
174 assert_response :success
177 assert_response :success
175 assert_template 'annotate'
178 assert_template 'annotate'
176 # 1.1 line
179 # 1.1 line
177 assert_tag :tag => 'th', :attributes => { :class => 'line-num' },
180 assert_tag :tag => 'th',
181 :attributes => { :class => 'line-num' },
178 :content => '18',
182 :content => '18',
179 :sibling => { :tag => 'td', :attributes => { :class => 'revision' },
183 :sibling => {
184 :tag => 'td',
185 :attributes => { :class => 'revision' },
180 :content => /1.1/,
186 :content => /1.1/,
181 :sibling => { :tag => 'td', :attributes => { :class => 'author' },
187 :sibling => {
188 :tag => 'td',
189 :attributes => { :class => 'author' },
182 :content => /LANG/
190 :content => /LANG/
183 }
191 }
184 }
192 }
185 # 1.2 line
193 # 1.2 line
186 assert_tag :tag => 'th', :attributes => { :class => 'line-num' },
194 assert_tag :tag => 'th',
195 :attributes => { :class => 'line-num' },
187 :content => '32',
196 :content => '32',
188 :sibling => { :tag => 'td', :attributes => { :class => 'revision' },
197 :sibling => {
198 :tag => 'td',
199 :attributes => { :class => 'revision' },
189 :content => /1.2/,
200 :content => /1.2/,
190 :sibling => { :tag => 'td', :attributes => { :class => 'author' },
201 :sibling => {
202 :tag => 'td',
203 :attributes => { :class => 'author' },
191 :content => /LANG/
204 :content => /LANG/
192 }
205 }
193 }
206 }
General Comments 0
You need to be logged in to leave comments. Login now