Commit d735481e authored by jplang's avatar jplang

Quote values in DOM selectors for Nokogiri compatibility.

git-svn-id: https://svn.redmine.org/redmine/trunk@13619 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 4c8117c2
......@@ -75,7 +75,7 @@ class ActivitiesControllerTest < ActionController::TestCase
assert_template 'index'
assert_not_nil assigns(:events_by_day)
assert_select 'h2 a[href=/users/2]', :text => 'John Smith'
assert_select 'h2 a[href="/users/2"]', :text => 'John Smith'
i1 = Issue.find(1)
d1 = User.find(1).time_to_date(i1.created_on)
......
......@@ -129,7 +129,7 @@ class AdminControllerTest < ActionController::TestCase
assert_select 'tr#plugin-foo' do
assert_select 'td span.name', :text => 'Foo plugin'
assert_select 'td.configure a[href=/settings/plugin/foo]'
assert_select 'td.configure a[href="/settings/plugin/foo"]'
end
assert_select 'tr#plugin-bar' do
assert_select 'td span.name', :text => 'Bar'
......@@ -150,7 +150,7 @@ class AdminControllerTest < ActionController::TestCase
get :index
assert_response :success
assert_select 'div#admin-menu a[href=/foo/bar]', :text => 'Test'
assert_select 'div#admin-menu a[href="/foo/bar"]', :text => 'Test'
Redmine::MenuManager.map :admin_menu do |menu|
menu.delete :test_admin_menu_plugin_extension
......
......@@ -117,8 +117,8 @@ class BoardsControllerTest < ActionController::TestCase
assert_select 'select[name=?]', 'board[parent_id]' do
assert_select 'option', (Project.find(1).boards.size + 1)
assert_select 'option[value=]', :text => '&nbsp;'
assert_select 'option[value=1]', :text => 'Help'
assert_select 'option[value=""]', :text => '&nbsp;'
assert_select 'option[value="1"]', :text => 'Help'
end
end
......@@ -178,7 +178,7 @@ class BoardsControllerTest < ActionController::TestCase
assert_template 'edit'
assert_select 'select[name=?]', 'board[parent_id]' do
assert_select 'option[value=2][selected=selected]'
assert_select 'option[value="2"][selected=selected]'
end
end
......
......@@ -112,7 +112,7 @@ class EnumerationsControllerTest < ActionController::TestCase
assert_template 'destroy'
assert_not_nil Enumeration.find_by_id(4)
assert_select 'select[name=reassign_to_id]' do
assert_select 'option[value=6]', :text => 'High'
assert_select 'option[value="6"]', :text => 'High'
end
end
......
......@@ -60,11 +60,11 @@ class IssuesControllerTest < ActionController::TestCase
assert_nil assigns(:project)
# links to visible issues
assert_select 'a[href=/issues/1]', :text => /#{ESCAPED_UCANT} print recipes/
assert_select 'a[href=/issues/5]', :text => /Subproject issue/
assert_select 'a[href="/issues/1"]', :text => /#{ESCAPED_UCANT} print recipes/
assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
# private projects hidden
assert_select 'a[href=/issues/6]', 0
assert_select 'a[href=/issues/4]', 0
assert_select 'a[href="/issues/6"]', 0
assert_select 'a[href="/issues/4"]', 0
# project column
assert_select 'th', :text => /Project/
end
......@@ -78,8 +78,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_not_nil assigns(:issues)
assert_nil assigns(:project)
assert_select 'a[href=/issues/1]', 0
assert_select 'a[href=/issues/5]', :text => /Subproject issue/
assert_select 'a[href="/issues/1"]', 0
assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
end
def test_index_should_list_visible_issues_only
......@@ -96,8 +96,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'index'
assert_not_nil assigns(:issues)
assert_select 'a[href=/issues/1]', :text => /#{ESCAPED_UCANT} print recipes/
assert_select 'a[href=/issues/5]', 0
assert_select 'a[href="/issues/1"]', :text => /#{ESCAPED_UCANT} print recipes/
assert_select 'a[href="/issues/5"]', 0
end
def test_index_with_project_and_subprojects
......@@ -107,9 +107,9 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'index'
assert_not_nil assigns(:issues)
assert_select 'a[href=/issues/1]', :text => /#{ESCAPED_UCANT} print recipes/
assert_select 'a[href=/issues/5]', :text => /Subproject issue/
assert_select 'a[href=/issues/6]', 0
assert_select 'a[href="/issues/1"]', :text => /#{ESCAPED_UCANT} print recipes/
assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
assert_select 'a[href="/issues/6"]', 0
end
def test_index_with_project_and_subprojects_should_show_private_subprojects_with_permission
......@@ -120,9 +120,9 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'index'
assert_not_nil assigns(:issues)
assert_select 'a[href=/issues/1]', :text => /#{ESCAPED_UCANT} print recipes/
assert_select 'a[href=/issues/5]', :text => /Subproject issue/
assert_select 'a[href=/issues/6]', :text => /Issue of a private subproject/
assert_select 'a[href="/issues/1"]', :text => /#{ESCAPED_UCANT} print recipes/
assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
assert_select 'a[href="/issues/6"]', :text => /Issue of a private subproject/
end
def test_index_with_project_and_default_filter
......@@ -368,9 +368,9 @@ class IssuesControllerTest < ActionController::TestCase
def test_index_should_omit_page_param_in_export_links
get :index, :page => 2
assert_response :success
assert_select 'a.atom[href=/issues.atom]'
assert_select 'a.csv[href=/issues.csv]'
assert_select 'a.pdf[href=/issues.pdf]'
assert_select 'a.atom[href="/issues.atom"]'
assert_select 'a.csv[href="/issues.csv"]'
assert_select 'a.pdf[href="/issues.pdf"]'
assert_select 'form#csv-export-form[action=/issues.csv]'
end
......@@ -1026,8 +1026,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'form#issue-form' do
assert_select 'select[name=?]', 'issue[priority_id]' do
assert_select 'option[value=4]'
assert_select 'option[value=15]', 0
assert_select 'option[value="4"]'
assert_select 'option[value="15"]', 0
end
end
end
......@@ -1137,7 +1137,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'div.subject' do
assert_select 'h3', 'Child Issue'
assert_select 'a[href=/issues/1]'
assert_select 'a[href="/issues/1"]'
end
end
......@@ -1166,8 +1166,8 @@ class IssuesControllerTest < ActionController::TestCase
count = Issue.open.visible.count
assert_select 'div.next-prev-links' do
assert_select 'a[href=/issues/2]', :text => /Previous/
assert_select 'a[href=/issues/5]', :text => /Next/
assert_select 'a[href="/issues/2"]', :text => /Previous/
assert_select 'a[href="/issues/5"]', :text => /Next/
assert_select 'span.position', :text => "3 of #{count}"
end
end
......@@ -1187,8 +1187,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 12, assigns(:next_issue_id)
assert_select 'div.next-prev-links' do
assert_select 'a[href=/issues/8]', :text => /Previous/
assert_select 'a[href=/issues/12]', :text => /Next/
assert_select 'a[href="/issues/8"]', :text => /Previous/
assert_select 'a[href="/issues/12"]', :text => /Next/
end
end
......@@ -1221,8 +1221,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 7, assigns(:next_issue_id)
assert_select 'div.next-prev-links' do
assert_select 'a[href=/issues/2]', :text => /Previous/
assert_select 'a[href=/issues/7]', :text => /Next/
assert_select 'a[href="/issues/2"]', :text => /Previous/
assert_select 'a[href="/issues/7"]', :text => /Next/
end
end
......@@ -1240,7 +1240,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'div.next-prev-links' do
assert_select 'a', :text => /Previous/, :count => 0
assert_select 'a[href=/issues/2]', :text => /Next/
assert_select 'a[href="/issues/2"]', :text => /Next/
end
end
......@@ -1276,8 +1276,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 1, assigns(:next_issue_id)
assert_select 'div.next-prev-links' do
assert_select 'a[href=/issues/2]', :text => /Previous/
assert_select 'a[href=/issues/1]', :text => /Next/
assert_select 'a[href="/issues/2"]', :text => /Previous/
assert_select 'a[href="/issues/1"]', :text => /Next/
end
end
......@@ -1285,7 +1285,7 @@ class IssuesControllerTest < ActionController::TestCase
get :show, :id => 2
assert_response :success
assert_select '.assigned-to' do
assert_select 'a[href=/users/3]'
assert_select 'a[href="/users/3"]'
end
end
......@@ -1311,7 +1311,7 @@ class IssuesControllerTest < ActionController::TestCase
get :show, :id => 1
assert_select 'div#watchers ul' do
assert_select 'li' do
assert_select 'a[href=/users/2]'
assert_select 'a[href="/users/2"]'
assert_select 'a img[alt=Delete]'
end
end
......@@ -1328,7 +1328,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'div#watchers ul' do
assert_select 'li' do
assert_select 'img.gravatar'
assert_select 'a[href=/users/2]'
assert_select 'a[href="/users/2"]'
assert_select 'a img[alt=Delete]'
end
end
......@@ -1343,8 +1343,8 @@ class IssuesControllerTest < ActionController::TestCase
end
assert_select 'div.thumbnails' do
assert_select 'a[href=/attachments/16/testfile.png]' do
assert_select 'img[src=/attachments/thumbnail/16]'
assert_select 'a[href="/attachments/16/testfile.png"]' do
assert_select 'img[src="/attachments/thumbnail/16"]'
end
end
end
......@@ -1511,7 +1511,7 @@ class IssuesControllerTest < ActionController::TestCase
# Be sure we don't display inactive IssuePriorities
assert ! IssuePriority.find(15).active?
assert_select 'select[name=?]', 'issue[priority_id]' do
assert_select 'option[value=15]', 0
assert_select 'option[value="15"]', 0
end
end
......@@ -1551,9 +1551,9 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success
assert_template 'new'
assert_select 'select[name=?]', 'issue[status_id]' do
assert_select 'option[value=1][selected=selected]'
assert_select 'option[value="1"][selected=selected]'
end
assert_select 'input[name=was_default_status][value=1]'
assert_select 'input[name=was_default_status][value="1"]'
end
def test_get_new_with_list_custom_field
......@@ -1595,7 +1595,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'select[name=?][multiple=multiple]', "issue[custom_field_values][#{field.id}][]" do
assert_select 'option', Project.find(1).users.count
assert_select 'option[value=2]', :text => 'John Smith'
assert_select 'option[value="2"]', :text => 'John Smith'
end
assert_select 'input[name=?][type=hidden][value=?]', "issue[custom_field_values][#{field.id}][]", ''
end
......@@ -1662,7 +1662,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 'Custom field value', issue.custom_field_value(2)
assert_select 'select[name=?]', 'issue[tracker_id]' do
assert_select 'option[value=3][selected=selected]'
assert_select 'option[value="3"][selected=selected]'
end
assert_select 'textarea[name=?]', 'issue[description]', :text => /Prefilled/
assert_select 'input[name=?][value=?]', 'issue[custom_field_values][2]', 'Custom field value'
......@@ -2176,7 +2176,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'textarea[name=?]', 'issue[description]', :text => 'This is a description'
assert_select 'select[name=?]', 'issue[priority_id]' do
assert_select 'option[value=6][selected=selected]', :text => 'High'
assert_select 'option[value="6"][selected=selected]', :text => 'High'
end
# Custom fields
assert_select 'select[name=?]', 'issue[custom_field_values][1]' do
......@@ -2195,9 +2195,9 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success
assert_template 'new'
assert_select 'input[name=?][value=2]:not(checked)', 'issue[watcher_user_ids][]'
assert_select 'input[name=?][value=3][checked=checked]', 'issue[watcher_user_ids][]'
assert_select 'input[name=?][value=8][checked=checked]', 'issue[watcher_user_ids][]'
assert_select 'input[name=?][value="2"]:not(checked)', 'issue[watcher_user_ids][]'
assert_select 'input[name=?][value="3"][checked=checked]', 'issue[watcher_user_ids][]'
assert_select 'input[name=?][value="8"][checked=checked]', 'issue[watcher_user_ids][]'
end
def test_post_create_should_ignore_non_safe_attributes
......@@ -2474,14 +2474,14 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'form[id=issue-form][action=/projects/ecookbook/issues]' do
assert_select 'select[name=?]', 'issue[project_id]' do
assert_select 'option[value=1][selected=selected]', :text => 'eCookbook'
assert_select 'option[value=2]:not([selected])', :text => 'OnlineStore'
assert_select 'option[value="1"][selected=selected]', :text => 'eCookbook'
assert_select 'option[value="2"]:not([selected])', :text => 'OnlineStore'
end
assert_select 'input[name=copy_from][value=1]'
assert_select 'input[name=copy_from][value="1"]'
end
# "New issue" menu item should not link to copy
assert_select '#main-menu a.new-issue[href=/projects/ecookbook/issues/new]'
assert_select '#main-menu a.new-issue[href="/projects/ecookbook/issues/new"]'
end
def test_new_as_copy_with_attachments_should_show_copy_attachments_checkbox
......@@ -2490,7 +2490,7 @@ class IssuesControllerTest < ActionController::TestCase
assert issue.attachments.count > 0
get :new, :project_id => 1, :copy_from => 3
assert_select 'input[name=copy_attachments][type=checkbox][checked=checked][value=1]'
assert_select 'input[name=copy_attachments][type=checkbox][checked=checked][value="1"]'
end
def test_new_as_copy_without_attachments_should_not_show_copy_attachments_checkbox
......@@ -2507,7 +2507,7 @@ class IssuesControllerTest < ActionController::TestCase
issue = Issue.generate_with_descendants!
get :new, :project_id => 1, :copy_from => issue.id
assert_select 'input[type=checkbox][name=copy_subtasks][checked=checked][value=1]'
assert_select 'input[type=checkbox][name=copy_subtasks][checked=checked][value="1"]'
end
def test_new_as_copy_with_invalid_issue_should_respond_with_404
......@@ -2650,10 +2650,10 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'form#issue-form[action=/projects/ecookbook/issues]' do
assert_select 'select[name=?]', 'issue[project_id]' do
assert_select 'option[value=1]:not([selected])', :text => 'eCookbook'
assert_select 'option[value=2][selected=selected]', :text => 'OnlineStore'
assert_select 'option[value="1"]:not([selected])', :text => 'eCookbook'
assert_select 'option[value="2"][selected=selected]', :text => 'OnlineStore'
end
assert_select 'input[name=copy_from][value=1]'
assert_select 'input[name=copy_from][value="1"]'
end
end
......@@ -2680,7 +2680,7 @@ class IssuesControllerTest < ActionController::TestCase
# Be sure we don't display inactive IssuePriorities
assert ! IssuePriority.find(15).active?
assert_select 'select[name=?]', 'issue[priority_id]' do
assert_select 'option[value=15]', 0
assert_select 'option[value="15"]', 0
end
end
......@@ -2712,17 +2712,17 @@ class IssuesControllerTest < ActionController::TestCase
assert_equal 5, issue.status_id
assert_select 'select[name=?]', 'issue[status_id]' do
assert_select 'option[value=5][selected=selected]', :text => 'Closed'
assert_select 'option[value="5"][selected=selected]', :text => 'Closed'
end
assert_equal 7, issue.priority_id
assert_select 'select[name=?]', 'issue[priority_id]' do
assert_select 'option[value=7][selected=selected]', :text => 'Urgent'
assert_select 'option[value="7"][selected=selected]', :text => 'Urgent'
end
assert_select 'input[name=?][value=2.5]', 'time_entry[hours]'
assert_select 'select[name=?]', 'time_entry[activity_id]' do
assert_select 'option[value=10][selected=selected]', :text => 'Development'
assert_select 'option[value="10"][selected=selected]', :text => 'Development'
end
assert_select 'input[name=?][value=test_get_edit_with_params]', 'time_entry[comments]'
end
......@@ -3302,7 +3302,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_select 'form#bulk_edit_form[action=?]', '/issues/bulk_update' do
assert_select 'input[name=?]', 'ids[]', 2
assert_select 'input[name=?][value=1][type=hidden]', 'ids[]'
assert_select 'input[name=?][value="1"][type=hidden]', 'ids[]'
assert_select 'select[name=?]', 'issue[project_id]'
assert_select 'input[name=?]', 'issue[parent_issue_id]'
......@@ -3320,7 +3320,7 @@ class IssuesControllerTest < ActionController::TestCase
# Be sure we don't display inactive IssuePriorities
assert ! IssuePriority.find(15).active?
assert_select 'select[name=?]', 'issue[priority_id]' do
assert_select 'option[value=15]', 0
assert_select 'option[value="15"]', 0
end
end
end
......@@ -3736,7 +3736,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success
assert_template 'bulk_edit'
assert_select 'select[name=?]', 'issue[tracker_id]' do
assert_select 'option[value=2][selected=selected]'
assert_select 'option[value="2"][selected=selected]'
end
assert_select 'input[name=?][value=?]', 'issue[start_date]', 'foo'
end
......@@ -4045,7 +4045,7 @@ class IssuesControllerTest < ActionController::TestCase
get :index
assert_select 'div#quick-search form' do
assert_select 'input[name=issues][value=1][type=hidden]'
assert_select 'input[name=issues][value="1"][type=hidden]'
end
end
end
......@@ -75,7 +75,7 @@ class IssuesControllerTransactionTest < ActionController::TestCase
assert_select 'input[name=?][value=?]', 'conflict_resolution', 'add_notes'
assert_select 'label' do
assert_select 'input[name=?][value=?]', 'conflict_resolution', 'cancel'
assert_select 'a[href=/issues/2]'
assert_select 'a[href="/issues/2"]'
end
end
......
......@@ -46,7 +46,7 @@ class MyControllerTest < ActionController::TestCase
get :page
assert_response :success
assert_select 'tr.time-entry' do
assert_select 'td.subject a[href=/issues/1]'
assert_select 'td.subject a[href="/issues/1"]'
assert_select 'td.hours', :text => '2.50'
end
end
......@@ -119,7 +119,7 @@ class MyControllerTest < ActionController::TestCase
def test_my_account_should_show_destroy_link
get :account
assert_select 'a[href=/my/account/destroy]'
assert_select 'a[href="/my/account/destroy"]'
end
def test_get_destroy_should_display_the_destroy_confirmation
......
......@@ -28,7 +28,7 @@ class PrincipalMembershipsControllerTest < ActionController::TestCase
get :new, :user_id => 7
assert_response :success
assert_select 'label', :text => 'eCookbook' do
assert_select 'input[name=?][value=1]:not([disabled])', 'membership[project_ids][]'
assert_select 'input[name=?][value="1"]:not([disabled])', 'membership[project_ids][]'
end
end
......@@ -38,7 +38,7 @@ class PrincipalMembershipsControllerTest < ActionController::TestCase
get :new, :user_id => 7
assert_response :success
assert_select 'label', :text => 'eCookbook' do
assert_select 'input[name=?][value=1][disabled=disabled]', 'membership[project_ids][]'
assert_select 'input[name=?][value="1"][disabled=disabled]', 'membership[project_ids][]'
end
end
......
......@@ -103,9 +103,9 @@ class ProjectsControllerTest < ActionController::TestCase
assert_select 'select[name=?]', 'project[parent_id]' do
# parent project selected
assert_select 'option[value=1][selected=selected]'
assert_select 'option[value="1"][selected=selected]'
# no empty value
assert_select 'option[value=]', 0
assert_select 'option[value=""]', 0
end
end
......
......@@ -35,7 +35,7 @@ class QueriesControllerTest < ActionController::TestCase
get :new, :project_id => 1
assert_response :success
assert_template 'new'
assert_select 'input[name=?][value=0][checked=checked]', 'query[visibility]'
assert_select 'input[name=?][value="0"][checked=checked]', 'query[visibility]'
assert_tag :tag => 'input', :attributes => { :type => 'checkbox',
:name => 'query_is_for_all',
:checked => nil,
......@@ -197,7 +197,7 @@ class QueriesControllerTest < ActionController::TestCase
get :edit, :id => 4
assert_response :success
assert_template 'edit'
assert_select 'input[name=?][value=2][checked=checked]', 'query[visibility]'
assert_select 'input[name=?][value="2"][checked=checked]', 'query[visibility]'
assert_tag :tag => 'input', :attributes => { :type => 'checkbox',
:name => 'query_is_for_all',
:checked => 'checked',
......@@ -233,7 +233,7 @@ class QueriesControllerTest < ActionController::TestCase
get :edit, :id => 1
assert_response :success
assert_template 'edit'
assert_select 'input[name=?][value=2][checked=checked]', 'query[visibility]'
assert_select 'input[name=?][value="2"][checked=checked]', 'query[visibility]'
assert_tag :tag => 'input', :attributes => { :type => 'checkbox',
:name => 'query_is_for_all',
:checked => nil,
......
......@@ -62,7 +62,7 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
entry = assigns(:entries).detect {|e| e.name == 'subversion_test'}
assert_not_nil entry
assert_equal 'dir', entry.kind
assert_select 'tr.dir a[href=/projects/subproject1/repository/show/subversion_test]'
assert_select 'tr.dir a[href="/projects/subproject1/repository/show/subversion_test"]'
assert_tag 'input', :attributes => {:name => 'rev'}
assert_tag 'a', :content => 'Statistics'
......@@ -80,9 +80,9 @@ class RepositoriesSubversionControllerTest < ActionController::TestCase
get :show, :id => PRJ_ID, :repository_id => 'svn'
assert_response :success
assert_template 'show'
assert_select 'tr.dir a[href=/projects/subproject1/repository/svn/show/subversion_test]'
assert_select 'tr.dir a[href="/projects/subproject1/repository/svn/show/subversion_test"]'
# Repository menu should link to the main repo
assert_select '#main-menu a[href=/projects/subproject1/repository]'
assert_select '#main-menu a[href="/projects/subproject1/repository"]'
end
def test_browse_directory
......
......@@ -55,7 +55,7 @@ class RolesControllerTest < ActionController::TestCase
assert_select 'form' do
# blank name
assert_select 'input[name=?][value=]', 'role[name]'
assert_select 'input[name=?][value=""]', 'role[name]'
# edit_project permission checked
assert_select 'input[type=checkbox][name=?][value=edit_project][checked=checked]', 'role[permissions][]'
# add_project permission not checked
......@@ -63,7 +63,7 @@ class RolesControllerTest < ActionController::TestCase
assert_select 'input[type=checkbox][name=?][value=add_project][checked=checked]', 'role[permissions][]', 0
# workflow copy selected
assert_select 'select[name=?]', 'copy_workflow_from' do
assert_select 'option[value=2][selected=selected]'
assert_select 'option[value="2"][selected=selected]'
end
end
end
......
......@@ -93,19 +93,19 @@ class SettingsControllerTest < ActionController::TestCase
assert_select 'tr.commit-keywords:nth-child(1)' do
assert_select 'input[name=?][value=?]', 'settings[commit_update_keywords][keywords][]', 'fixes, resolves'
assert_select 'select[name=?]', 'settings[commit_update_keywords][status_id][]' do
assert_select 'option[value=3][selected=selected]'
assert_select 'option[value="3"][selected=selected]'
end
end
assert_select 'tr.commit-keywords:nth-child(2)' do
assert_select 'input[name=?][value=?]', 'settings[commit_update_keywords][keywords][]', 'closes'
assert_select 'select[name=?]', 'settings[commit_update_keywords][status_id][]' do
assert_select 'option[value=5][selected=selected]', :text => 'Closed'
assert_select 'option[value="5"][selected=selected]', :text => 'Closed'
end
assert_select 'select[name=?]', 'settings[commit_update_keywords][done_ratio][]' do
assert_select 'option[value=100][selected=selected]', :text => '100 %'
assert_select 'option[value="100"][selected=selected]', :text => '100 %'
end
assert_select 'select[name=?]', 'settings[commit_update_keywords][if_tracker_id][]' do
assert_select 'option[value=2][selected=selected]', :text => 'Feature request'
assert_select 'option[value="2"][selected=selected]', :text => 'Feature request'
end
end
end
......
......@@ -37,7 +37,7 @@ class TimelogControllerTest < ActionController::TestCase
assert_select 'input[name=?][type=hidden]', 'issue_id', 0
assert_select 'select[name=?]', 'time_entry[project_id]' do
# blank option for project
assert_select 'option[value=]'
assert_select 'option[value=""]'
end
end
......@@ -67,7 +67,7 @@ class TimelogControllerTest < ActionController::TestCase
assert_response :success
assert_template 'new'
assert_select 'select[name=?]', 'time_entry[project_id]' do
assert_select 'option[value=1][selected=selected]'
assert_select 'option[value="1"][selected=selected]'
end
end
......@@ -361,8 +361,8 @@ class TimelogControllerTest < ActionController::TestCase
# Activities
assert_select 'select[name=?]', 'time_entry[activity_id]' do
assert_select 'option[value=]', :text => '(No change)'
assert_select 'option[value=9]', :text => 'Design'
assert_select 'option[value=""]', :text => '(No change)'
assert_select 'option[value="9"]', :text => 'Design'
end
end
end
......
......@@ -127,7 +127,7 @@ class TrackersControllerTest < ActionController::TestCase
assert_select 'input[name=?][value=category_id]', 'tracker[core_fields][]'
assert_select 'input[name=?][value=category_id][checked=checked]', 'tracker[core_fields][]', 0
assert_select 'input[name=?][value=][type=hidden]', 'tracker[core_fields][]'
assert_select 'input[name=?][value=""][type=hidden]', 'tracker[core_fields][]'
end
def test_update
......@@ -187,10 +187,10 @@ class TrackersControllerTest < ActionController::TestCase
assert_select 'form' do
assert_select 'input[type=checkbox][name=?][value=assigned_to_id]', 'trackers[1][core_fields][]'
assert_select 'input[type=checkbox][name=?][value=2]', 'trackers[1][custom_field_ids][]'
assert_select 'input[type=checkbox][name=?][value="2"]', 'trackers[1][custom_field_ids][]'
assert_select 'input[type=hidden][name=?][value=]', 'trackers[1][core_fields][]'
assert_select 'input[type=hidden][name=?][value=]', 'trackers[1][custom_field_ids][]'
assert_select 'input[type=hidden][name=?][value=""]', 'trackers[1][core_fields][]'
assert_select 'input[type=hidden][name=?][value=""]', 'trackers[1][custom_field_ids][]'
end
end
......