Commit 85458093 authored by jplang's avatar jplang

Add test assertions to the four controller test cases (#26125).

Patch by Mischa The Evil.

git-svn-id: https://svn.redmine.org/redmine/trunk@16704 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent a85cfa4e
......@@ -36,6 +36,17 @@ class CalendarsControllerTest < Redmine::ControllerTest
: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
......
......@@ -35,6 +35,18 @@ class GanttsControllerTest < Redmine::ControllerTest
}
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
......
......@@ -94,6 +94,17 @@ class IssuesControllerTest < Redmine::ControllerTest
}
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
......
......@@ -37,6 +37,18 @@ class TimeEntryReportsControllerTest < Redmine::ControllerTest
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment