74 |
74 |
assert_response :success
|
75 |
75 |
|
76 |
76 |
assert_select '#search-results' do
|
77 |
|
assert_select 'dt.issue a', :text => /Feature request #2/
|
|
77 |
assert_select 'dt.issue a', :text => /Bug #1/
|
78 |
78 |
assert_select 'dt.issue a', :text => /Bug #5/
|
79 |
79 |
assert_select 'dt.changeset a', :text => /Revision 1/
|
80 |
80 |
|
81 |
|
assert_select 'dt.issue a', :text => /Add ingredients categories/
|
82 |
|
assert_select 'dd', :text => /should be classified by categories/
|
|
81 |
assert_select 'dt.issue a', :text => /Cannot print recipes/
|
|
82 |
assert_select 'dd', :text => /Unable to print recipes/
|
83 |
83 |
end
|
84 |
84 |
|
85 |
85 |
assert_select '#search-results-counts' do
|
... | ... | |
143 |
143 |
end
|
144 |
144 |
end
|
145 |
145 |
|
|
146 |
def test_search_time_entries_comments_on_project
|
|
147 |
get :index, :params => {:id => 1, :q => 'hours'}
|
|
148 |
assert_response :success
|
|
149 |
|
|
150 |
assert_select '#search-results' do
|
|
151 |
assert_select 'dt.time-entry', 1
|
|
152 |
assert_select 'dt.time-entry span.project', 0
|
|
153 |
assert_select 'dt.time-entry a', :text => /Bug #1 \(New\)/
|
|
154 |
assert_select 'dd', :text => /My hours/
|
|
155 |
end
|
|
156 |
end
|
|
157 |
|
|
158 |
def test_search_time_entries_comments_on_project_with_subprojects_scope
|
|
159 |
get :index, :params => {:id => 1, :q => 'time spent', :scope => 'subprojects', :time_entries => 1}
|
|
160 |
assert_response :success
|
|
161 |
|
|
162 |
assert_select '#search-results' do
|
|
163 |
assert_select 'dt.time-entry', 1
|
|
164 |
assert_select 'dt.time-entry span.project', 1
|
|
165 |
assert_select 'dt.time-entry a', :text => /\(Project: eCookbook Subproject 1\)/
|
|
166 |
assert_select 'dd', :text => /Time spent on a subproject/
|
|
167 |
end
|
|
168 |
end
|
|
169 |
|
|
170 |
def test_search_time_entries_comments_on_all_projects
|
|
171 |
get :index, :params => {:q => 'recipe subproject commit', :all_words => ''}
|
|
172 |
assert_response :success
|
|
173 |
|
|
174 |
assert_select '#search-results' do
|
|
175 |
assert_select 'dt.time-entry', 1
|
|
176 |
assert_select 'dt.time-entry span.project', 1
|
|
177 |
assert_select 'dt.time-entry a', :text => /7.65 hours \(Project: eCookbook Subproject 1\)/
|
|
178 |
assert_select 'dd', :text => /Time spent on a subproject/
|
|
179 |
end
|
|
180 |
end
|
|
181 |
|
|
182 |
def test_search_time_entries_hours_on_project
|
|
183 |
get :index, :params => {:id => 1, :q => '"150"'}
|
|
184 |
assert_response :success
|
|
185 |
|
|
186 |
assert_select '#search-results' do
|
|
187 |
assert_select 'dt.time-entry', 1
|
|
188 |
assert_select 'dt.time-entry span.project', 0
|
|
189 |
assert_select 'dt.time-entry a', :text => /150.00 hours \(Bug #1 \(New\): Cannot print recipes\)/
|
|
190 |
end
|
|
191 |
end
|
|
192 |
|
|
193 |
def test_search_time_entries_spent_on_on_project
|
|
194 |
get :index, :params => {:id => 1, :q => '2007-03-12'}
|
|
195 |
assert_response :success
|
|
196 |
|
|
197 |
assert_select '#search-results' do
|
|
198 |
assert_select 'dt.time-entry', 1
|
|
199 |
assert_select 'dt.time-entry span.project', 0
|
|
200 |
assert_select 'dt.time-entry a', :text => /150.00 hours \(Bug #1 \(New\): Cannot print recipes\)/
|
|
201 |
end
|
|
202 |
end
|
|
203 |
|
146 |
204 |
def test_search_all_projects_with_scope_param
|
147 |
205 |
get :index, :params => {:q => 'issue', :scope => 'all'}
|
148 |
206 |
assert_response :success
|