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