Patch #26125 » 0004-Add-test-assertions-to-the-four-controller-test-case.patch
| test/functional/calendars_controller_test.rb | ||
|---|---|---|
|
:project_id => 1
|
||
|
}
|
||
|
assert_response :success
|
||
|
# query form
|
||
|
assert_select 'form#query_form' do
|
||
|
assert_select 'div#query_form_with_buttons.hide-when-print' do
|
||
|
assert_select 'div#query_form_content' do
|
||
|
assert_select 'fieldset#filters.collapsible'
|
||
|
end
|
||
|
assert_select 'p.contextual'
|
||
|
assert_select 'p.buttons'
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
def test_show_should_run_custom_queries
|
||
| test/functional/gantts_controller_test.rb | ||
|---|---|---|
|
}
|
||
|
assert_response :success
|
||
|
# query form
|
||
|
assert_select 'form#query_form' do
|
||
|
assert_select 'div#query_form_with_buttons.hide-when-print' do
|
||
|
assert_select 'div#query_form_content' do
|
||
|
assert_select 'fieldset#filters.collapsible'
|
||
|
assert_select 'fieldset#options'
|
||
|
end
|
||
|
assert_select 'p.contextual'
|
||
|
assert_select 'p.buttons'
|
||
|
end
|
||
|
end
|
||
|
# Issue with start and due dates
|
||
|
i = Issue.find(1)
|
||
|
assert_not_nil i.due_date
|
||
| test/functional/issues_controller_test.rb | ||
|---|---|---|
|
}
|
||
|
assert_response :success
|
||
|
# query form
|
||
|
assert_select 'form#query_form' do
|
||
|
assert_select 'div#query_form_with_buttons.hide-when-print' do
|
||
|
assert_select 'div#query_form_content' do
|
||
|
assert_select 'fieldset#filters.collapsible'
|
||
|
assert_select 'fieldset#options'
|
||
|
end
|
||
|
assert_select 'p.buttons'
|
||
|
end
|
||
|
end
|
||
|
assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/
|
||
|
assert_select 'a[href="/issues/5"]', 0
|
||
|
end
|
||
| test/functional/time_entry_reports_controller_test.rb | ||
|---|---|---|
|
def test_report_at_project_level
|
||
|
get :report, :params => {:project_id => 'ecookbook'}
|
||
|
assert_response :success
|
||
|
# query form
|
||
|
assert_select 'form#query_form' do
|
||
|
assert_select 'div#query_form_with_buttons.hide-when-print' do
|
||
|
assert_select 'div#query_form_content' do
|
||
|
assert_select 'fieldset#filters.collapsible'
|
||
|
assert_select 'fieldset#options'
|
||
|
end
|
||
|
assert_select 'p.buttons'
|
||
|
end
|
||
|
end
|
||
|
assert_select 'form#query_form[action=?]', '/projects/ecookbook/time_entries/report'
|
||
|
end
|
||
- « Previous
- 1
- …
- 10
- 11
- 12
- Next »