diff options
Diffstat (limited to 'test/functional')
19 files changed, 120 insertions, 120 deletions
diff --git a/test/functional/activities_controller_test.rb b/test/functional/activities_controller_test.rb index 06c1624b0..0c0fbb268 100644 --- a/test/functional/activities_controller_test.rb +++ b/test/functional/activities_controller_test.rb @@ -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) diff --git a/test/functional/admin_controller_test.rb b/test/functional/admin_controller_test.rb index a87c92b74..d5c115069 100644 --- a/test/functional/admin_controller_test.rb +++ b/test/functional/admin_controller_test.rb @@ -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 diff --git a/test/functional/boards_controller_test.rb b/test/functional/boards_controller_test.rb index a44612877..ee1533ba6 100644 --- a/test/functional/boards_controller_test.rb +++ b/test/functional/boards_controller_test.rb @@ -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 => ' ' - assert_select 'option[value=1]', :text => 'Help' + assert_select 'option[value=""]', :text => ' ' + 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 diff --git a/test/functional/enumerations_controller_test.rb b/test/functional/enumerations_controller_test.rb index 79bfd0039..626bc3196 100644 --- a/test/functional/enumerations_controller_test.rb +++ b/test/functional/enumerations_controller_test.rb @@ -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 diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb index 8a808656a..6680557bc 100644 --- a/test/functional/issues_controller_test.rb +++ b/test/functional/issues_controller_test.rb @@ -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 diff --git a/test/functional/issues_controller_transaction_test.rb b/test/functional/issues_controller_transaction_test.rb index a2b207b40..5f2b3dfeb 100644 --- a/test/functional/issues_controller_transaction_test.rb +++ b/test/functional/issues_controller_transaction_test.rb @@ -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 diff --git a/test/functional/my_controller_test.rb b/test/functional/my_controller_test.rb index b9e965491..ea0184b2d 100644 --- a/test/functional/my_controller_test.rb +++ b/test/functional/my_controller_test.rb @@ -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 diff --git a/test/functional/principal_memberships_controller_test.rb b/test/functional/principal_memberships_controller_test.rb index fe89c1153..7d15114b2 100644 --- a/test/functional/principal_memberships_controller_test.rb +++ b/test/functional/principal_memberships_controller_test.rb @@ -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 diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb index be6e738ea..60bc580d3 100644 --- a/test/functional/projects_controller_test.rb +++ b/test/functional/projects_controller_test.rb @@ -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 diff --git a/test/functional/queries_controller_test.rb b/test/functional/queries_controller_test.rb index 8f1b61be6..337478de6 100644 --- a/test/functional/queries_controller_test.rb +++ b/test/functional/queries_controller_test.rb @@ -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, diff --git a/test/functional/repositories_subversion_controller_test.rb b/test/functional/repositories_subversion_controller_test.rb index 4127b152e..66522d6e5 100644 --- a/test/functional/repositories_subversion_controller_test.rb +++ b/test/functional/repositories_subversion_controller_test.rb @@ -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 diff --git a/test/functional/roles_controller_test.rb b/test/functional/roles_controller_test.rb index 6e1fc3da5..ddd231dcf 100644 --- a/test/functional/roles_controller_test.rb +++ b/test/functional/roles_controller_test.rb @@ -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 diff --git a/test/functional/settings_controller_test.rb b/test/functional/settings_controller_test.rb index 6806fd215..e7fe29780 100644 --- a/test/functional/settings_controller_test.rb +++ b/test/functional/settings_controller_test.rb @@ -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 diff --git a/test/functional/timelog_controller_test.rb b/test/functional/timelog_controller_test.rb index d07f7a946..a60bd2b6b 100644 --- a/test/functional/timelog_controller_test.rb +++ b/test/functional/timelog_controller_test.rb @@ -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 diff --git a/test/functional/trackers_controller_test.rb b/test/functional/trackers_controller_test.rb index 4e872926c..ca2619e1f 100644 --- a/test/functional/trackers_controller_test.rb +++ b/test/functional/trackers_controller_test.rb @@ -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 diff --git a/test/functional/users_controller_test.rb b/test/functional/users_controller_test.rb index d9a46bd60..50334931b 100644 --- a/test/functional/users_controller_test.rb +++ b/test/functional/users_controller_test.rb @@ -64,7 +64,7 @@ class UsersControllerTest < ActionController::TestCase assert users.any? assert_equal([], (users - Group.find(10).users)) assert_select 'select[name=group_id]' do - assert_select 'option[value=10][selected=selected]' + assert_select 'option[value="10"][selected=selected]' end end @@ -263,7 +263,7 @@ class UsersControllerTest < ActionController::TestCase assert_template 'new' assert_select 'select#pref_time_zone option[selected=selected]', :text => /Paris/ - assert_select 'input#pref_no_self_notified[value=1][checked=checked]' + assert_select 'input#pref_no_self_notified[value="1"][checked=checked]' end def test_edit diff --git a/test/functional/watchers_controller_test.rb b/test/functional/watchers_controller_test.rb index 628ad0550..f482bffc9 100644 --- a/test/functional/watchers_controller_test.rb +++ b/test/functional/watchers_controller_test.rb @@ -179,10 +179,10 @@ class WatchersControllerTest < ActionController::TestCase xhr :get, :autocomplete_for_user, :q => 'mi', :project_id => 'ecookbook' assert_response :success assert_select 'input', :count => 4 - assert_select 'input[name=?][value=1]', 'watcher[user_ids][]' - assert_select 'input[name=?][value=2]', 'watcher[user_ids][]' - assert_select 'input[name=?][value=8]', 'watcher[user_ids][]' - assert_select 'input[name=?][value=9]', 'watcher[user_ids][]' + assert_select 'input[name=?][value="1"]', 'watcher[user_ids][]' + assert_select 'input[name=?][value="2"]', 'watcher[user_ids][]' + assert_select 'input[name=?][value="8"]', 'watcher[user_ids][]' + assert_select 'input[name=?][value="9"]', 'watcher[user_ids][]' end def test_search_non_member_on_create @@ -202,9 +202,9 @@ class WatchersControllerTest < ActionController::TestCase :object_type => 'issue', :project_id => 'ecookbook' assert_response :success assert_select 'input', :count => 3 - assert_select 'input[name=?][value=2]', 'watcher[user_ids][]' - assert_select 'input[name=?][value=8]', 'watcher[user_ids][]' - assert_select 'input[name=?][value=9]', 'watcher[user_ids][]' + assert_select 'input[name=?][value="2"]', 'watcher[user_ids][]' + assert_select 'input[name=?][value="8"]', 'watcher[user_ids][]' + assert_select 'input[name=?][value="9"]', 'watcher[user_ids][]' end def test_search_and_add_non_member_on_update diff --git a/test/functional/welcome_controller_test.rb b/test/functional/welcome_controller_test.rb index aa9afaeaf..2fd188c37 100644 --- a/test/functional/welcome_controller_test.rb +++ b/test/functional/welcome_controller_test.rb @@ -116,7 +116,7 @@ class WelcomeControllerTest < ActionController::TestCase @request.session[:user_id] = 2 get :index - assert_select 'a[href=/logout][data-method=post]', :text => 'Sign out' + assert_select 'a[href="/logout"][data-method=post]', :text => 'Sign out' end def test_call_hook_mixed_in diff --git a/test/functional/workflows_controller_test.rb b/test/functional/workflows_controller_test.rb index 5885c4e20..0d3af845a 100644 --- a/test/functional/workflows_controller_test.rb +++ b/test/functional/workflows_controller_test.rb @@ -55,9 +55,9 @@ class WorkflowsControllerTest < ActionController::TestCase assert_equal [2, 3, 5], assigns(:statuses).collect(&:id) # allowed transitions - assert_select 'input[type=checkbox][name=?][value=1][checked=checked]', 'transitions[3][5][always]' + assert_select 'input[type=checkbox][name=?][value="1"][checked=checked]', 'transitions[3][5][always]' # not allowed - assert_select 'input[type=checkbox][name=?][value=1]:not([checked=checked])', 'transitions[3][2][always]' + assert_select 'input[type=checkbox][name=?][value="1"]:not([checked=checked])', 'transitions[3][2][always]' # unused assert_select 'input[type=checkbox][name=?]', 'transitions[1][1][always]', 0 end @@ -135,13 +135,13 @@ class WorkflowsControllerTest < ActionController::TestCase assert_response :success assert_template 'permissions' - assert_select 'input[name=?][value=1]', 'role_id[]' - assert_select 'input[name=?][value=2]', 'tracker_id[]' + assert_select 'input[name=?][value="1"]', 'role_id[]' + assert_select 'input[name=?][value="2"]', 'tracker_id[]' # Required field assert_select 'select[name=?]', 'permissions[2][assigned_to_id]' do - assert_select 'option[value=]' - assert_select 'option[value=][selected=selected]', 0 + assert_select 'option[value=""]' + assert_select 'option[value=""][selected=selected]', 0 assert_select 'option[value=readonly]', :text => 'Read-only' assert_select 'option[value=readonly][selected=selected]', 0 assert_select 'option[value=required]', :text => 'Required' @@ -150,8 +150,8 @@ class WorkflowsControllerTest < ActionController::TestCase # Read-only field assert_select 'select[name=?]', 'permissions[3][fixed_version_id]' do - assert_select 'option[value=]' - assert_select 'option[value=][selected=selected]', 0 + assert_select 'option[value=""]' + assert_select 'option[value=""][selected=selected]', 0 assert_select 'option[value=readonly]', :text => 'Read-only' assert_select 'option[value=readonly][selected=selected]' assert_select 'option[value=required]', :text => 'Required' @@ -160,8 +160,8 @@ class WorkflowsControllerTest < ActionController::TestCase # Other field assert_select 'select[name=?]', 'permissions[3][due_date]' do - assert_select 'option[value=]' - assert_select 'option[value=][selected=selected]', 0 + assert_select 'option[value=""]' + assert_select 'option[value=""][selected=selected]', 0 assert_select 'option[value=readonly]', :text => 'Read-only' assert_select 'option[value=readonly][selected=selected]', 0 assert_select 'option[value=required]', :text => 'Required' @@ -179,7 +179,7 @@ class WorkflowsControllerTest < ActionController::TestCase # Custom field that is always required # The default option is "(Required)" assert_select 'select[name=?]', "permissions[3][#{cf.id}]" do - assert_select 'option[value=]' + assert_select 'option[value=""]' assert_select 'option[value=readonly]', :text => 'Read-only' assert_select 'option[value=required]', 0 end @@ -198,7 +198,7 @@ class WorkflowsControllerTest < ActionController::TestCase assert_select 'select[name=?]:not(.disabled)', "permissions[1][#{cf3.id}]" assert_select 'select[name=?][disabled=disabled]', "permissions[1][#{cf2.id}]" do - assert_select 'option[value=][selected=selected]', :text => 'Hidden' + assert_select 'option[value=""][selected=selected]', :text => 'Hidden' end end @@ -277,16 +277,16 @@ class WorkflowsControllerTest < ActionController::TestCase assert_response :success assert_template 'copy' assert_select 'select[name=source_tracker_id]' do - assert_select 'option[value=1]', :text => 'Bug' + assert_select 'option[value="1"]', :text => 'Bug' end assert_select 'select[name=source_role_id]' do - assert_select 'option[value=2]', :text => 'Developer' + assert_select 'option[value="2"]', :text => 'Developer' end assert_select 'select[name=?]', 'target_tracker_ids[]' do - assert_select 'option[value=3]', :text => 'Support request' + assert_select 'option[value="3"]', :text => 'Support request' end assert_select 'select[name=?]', 'target_role_ids[]' do - assert_select 'option[value=1]', :text => 'Manager' + assert_select 'option[value="1"]', :text => 'Manager' end end |