@@ -75,7 +75,7 class ActivitiesControllerTest < ActionController::TestCase | |||
|
75 | 75 | assert_template 'index' |
|
76 | 76 | assert_not_nil assigns(:events_by_day) |
|
77 | 77 | |
|
78 | assert_select 'h2 a[href=/users/2]', :text => 'John Smith' | |
|
78 | assert_select 'h2 a[href="/users/2"]', :text => 'John Smith' | |
|
79 | 79 | |
|
80 | 80 | i1 = Issue.find(1) |
|
81 | 81 | d1 = User.find(1).time_to_date(i1.created_on) |
@@ -129,7 +129,7 class AdminControllerTest < ActionController::TestCase | |||
|
129 | 129 | |
|
130 | 130 | assert_select 'tr#plugin-foo' do |
|
131 | 131 | assert_select 'td span.name', :text => 'Foo plugin' |
|
132 | assert_select 'td.configure a[href=/settings/plugin/foo]' | |
|
132 | assert_select 'td.configure a[href="/settings/plugin/foo"]' | |
|
133 | 133 | end |
|
134 | 134 | assert_select 'tr#plugin-bar' do |
|
135 | 135 | assert_select 'td span.name', :text => 'Bar' |
@@ -150,7 +150,7 class AdminControllerTest < ActionController::TestCase | |||
|
150 | 150 | |
|
151 | 151 | get :index |
|
152 | 152 | assert_response :success |
|
153 | assert_select 'div#admin-menu a[href=/foo/bar]', :text => 'Test' | |
|
153 | assert_select 'div#admin-menu a[href="/foo/bar"]', :text => 'Test' | |
|
154 | 154 | |
|
155 | 155 | Redmine::MenuManager.map :admin_menu do |menu| |
|
156 | 156 | menu.delete :test_admin_menu_plugin_extension |
@@ -117,8 +117,8 class BoardsControllerTest < ActionController::TestCase | |||
|
117 | 117 | |
|
118 | 118 | assert_select 'select[name=?]', 'board[parent_id]' do |
|
119 | 119 | assert_select 'option', (Project.find(1).boards.size + 1) |
|
120 | assert_select 'option[value=]', :text => ' ' | |
|
121 | assert_select 'option[value=1]', :text => 'Help' | |
|
120 | assert_select 'option[value=""]', :text => ' ' | |
|
121 | assert_select 'option[value="1"]', :text => 'Help' | |
|
122 | 122 | end |
|
123 | 123 | end |
|
124 | 124 | |
@@ -178,7 +178,7 class BoardsControllerTest < ActionController::TestCase | |||
|
178 | 178 | assert_template 'edit' |
|
179 | 179 | |
|
180 | 180 | assert_select 'select[name=?]', 'board[parent_id]' do |
|
181 | assert_select 'option[value=2][selected=selected]' | |
|
181 | assert_select 'option[value="2"][selected=selected]' | |
|
182 | 182 | end |
|
183 | 183 | end |
|
184 | 184 |
@@ -112,7 +112,7 class EnumerationsControllerTest < ActionController::TestCase | |||
|
112 | 112 | assert_template 'destroy' |
|
113 | 113 | assert_not_nil Enumeration.find_by_id(4) |
|
114 | 114 | assert_select 'select[name=reassign_to_id]' do |
|
115 | assert_select 'option[value=6]', :text => 'High' | |
|
115 | assert_select 'option[value="6"]', :text => 'High' | |
|
116 | 116 | end |
|
117 | 117 | end |
|
118 | 118 |
@@ -60,11 +60,11 class IssuesControllerTest < ActionController::TestCase | |||
|
60 | 60 | assert_nil assigns(:project) |
|
61 | 61 | |
|
62 | 62 | # links to visible issues |
|
63 | assert_select 'a[href=/issues/1]', :text => /#{ESCAPED_UCANT} print recipes/ | |
|
64 | assert_select 'a[href=/issues/5]', :text => /Subproject issue/ | |
|
63 | assert_select 'a[href="/issues/1"]', :text => /#{ESCAPED_UCANT} print recipes/ | |
|
64 | assert_select 'a[href="/issues/5"]', :text => /Subproject issue/ | |
|
65 | 65 | # private projects hidden |
|
66 | assert_select 'a[href=/issues/6]', 0 | |
|
67 | assert_select 'a[href=/issues/4]', 0 | |
|
66 | assert_select 'a[href="/issues/6"]', 0 | |
|
67 | assert_select 'a[href="/issues/4"]', 0 | |
|
68 | 68 | # project column |
|
69 | 69 | assert_select 'th', :text => /Project/ |
|
70 | 70 | end |
@@ -78,8 +78,8 class IssuesControllerTest < ActionController::TestCase | |||
|
78 | 78 | assert_not_nil assigns(:issues) |
|
79 | 79 | assert_nil assigns(:project) |
|
80 | 80 | |
|
81 | assert_select 'a[href=/issues/1]', 0 | |
|
82 | assert_select 'a[href=/issues/5]', :text => /Subproject issue/ | |
|
81 | assert_select 'a[href="/issues/1"]', 0 | |
|
82 | assert_select 'a[href="/issues/5"]', :text => /Subproject issue/ | |
|
83 | 83 | end |
|
84 | 84 | |
|
85 | 85 | def test_index_should_list_visible_issues_only |
@@ -96,8 +96,8 class IssuesControllerTest < ActionController::TestCase | |||
|
96 | 96 | assert_template 'index' |
|
97 | 97 | assert_not_nil assigns(:issues) |
|
98 | 98 | |
|
99 | assert_select 'a[href=/issues/1]', :text => /#{ESCAPED_UCANT} print recipes/ | |
|
100 | assert_select 'a[href=/issues/5]', 0 | |
|
99 | assert_select 'a[href="/issues/1"]', :text => /#{ESCAPED_UCANT} print recipes/ | |
|
100 | assert_select 'a[href="/issues/5"]', 0 | |
|
101 | 101 | end |
|
102 | 102 | |
|
103 | 103 | def test_index_with_project_and_subprojects |
@@ -107,9 +107,9 class IssuesControllerTest < ActionController::TestCase | |||
|
107 | 107 | assert_template 'index' |
|
108 | 108 | assert_not_nil assigns(:issues) |
|
109 | 109 | |
|
110 | assert_select 'a[href=/issues/1]', :text => /#{ESCAPED_UCANT} print recipes/ | |
|
111 | assert_select 'a[href=/issues/5]', :text => /Subproject issue/ | |
|
112 | assert_select 'a[href=/issues/6]', 0 | |
|
110 | assert_select 'a[href="/issues/1"]', :text => /#{ESCAPED_UCANT} print recipes/ | |
|
111 | assert_select 'a[href="/issues/5"]', :text => /Subproject issue/ | |
|
112 | assert_select 'a[href="/issues/6"]', 0 | |
|
113 | 113 | end |
|
114 | 114 | |
|
115 | 115 | def test_index_with_project_and_subprojects_should_show_private_subprojects_with_permission |
@@ -120,9 +120,9 class IssuesControllerTest < ActionController::TestCase | |||
|
120 | 120 | assert_template 'index' |
|
121 | 121 | assert_not_nil assigns(:issues) |
|
122 | 122 | |
|
123 | assert_select 'a[href=/issues/1]', :text => /#{ESCAPED_UCANT} print recipes/ | |
|
124 | assert_select 'a[href=/issues/5]', :text => /Subproject issue/ | |
|
125 | assert_select 'a[href=/issues/6]', :text => /Issue of a private subproject/ | |
|
123 | assert_select 'a[href="/issues/1"]', :text => /#{ESCAPED_UCANT} print recipes/ | |
|
124 | assert_select 'a[href="/issues/5"]', :text => /Subproject issue/ | |
|
125 | assert_select 'a[href="/issues/6"]', :text => /Issue of a private subproject/ | |
|
126 | 126 | end |
|
127 | 127 | |
|
128 | 128 | def test_index_with_project_and_default_filter |
@@ -368,9 +368,9 class IssuesControllerTest < ActionController::TestCase | |||
|
368 | 368 | def test_index_should_omit_page_param_in_export_links |
|
369 | 369 | get :index, :page => 2 |
|
370 | 370 | assert_response :success |
|
371 | assert_select 'a.atom[href=/issues.atom]' | |
|
372 | assert_select 'a.csv[href=/issues.csv]' | |
|
373 | assert_select 'a.pdf[href=/issues.pdf]' | |
|
371 | assert_select 'a.atom[href="/issues.atom"]' | |
|
372 | assert_select 'a.csv[href="/issues.csv"]' | |
|
373 | assert_select 'a.pdf[href="/issues.pdf"]' | |
|
374 | 374 | assert_select 'form#csv-export-form[action=/issues.csv]' |
|
375 | 375 | end |
|
376 | 376 | |
@@ -1026,8 +1026,8 class IssuesControllerTest < ActionController::TestCase | |||
|
1026 | 1026 | |
|
1027 | 1027 | assert_select 'form#issue-form' do |
|
1028 | 1028 | assert_select 'select[name=?]', 'issue[priority_id]' do |
|
1029 | assert_select 'option[value=4]' | |
|
1030 | assert_select 'option[value=15]', 0 | |
|
1029 | assert_select 'option[value="4"]' | |
|
1030 | assert_select 'option[value="15"]', 0 | |
|
1031 | 1031 | end |
|
1032 | 1032 | end |
|
1033 | 1033 | end |
@@ -1137,7 +1137,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1137 | 1137 | |
|
1138 | 1138 | assert_select 'div.subject' do |
|
1139 | 1139 | assert_select 'h3', 'Child Issue' |
|
1140 | assert_select 'a[href=/issues/1]' | |
|
1140 | assert_select 'a[href="/issues/1"]' | |
|
1141 | 1141 | end |
|
1142 | 1142 | end |
|
1143 | 1143 | |
@@ -1166,8 +1166,8 class IssuesControllerTest < ActionController::TestCase | |||
|
1166 | 1166 | count = Issue.open.visible.count |
|
1167 | 1167 | |
|
1168 | 1168 | assert_select 'div.next-prev-links' do |
|
1169 | assert_select 'a[href=/issues/2]', :text => /Previous/ | |
|
1170 | assert_select 'a[href=/issues/5]', :text => /Next/ | |
|
1169 | assert_select 'a[href="/issues/2"]', :text => /Previous/ | |
|
1170 | assert_select 'a[href="/issues/5"]', :text => /Next/ | |
|
1171 | 1171 | assert_select 'span.position', :text => "3 of #{count}" |
|
1172 | 1172 | end |
|
1173 | 1173 | end |
@@ -1187,8 +1187,8 class IssuesControllerTest < ActionController::TestCase | |||
|
1187 | 1187 | assert_equal 12, assigns(:next_issue_id) |
|
1188 | 1188 | |
|
1189 | 1189 | assert_select 'div.next-prev-links' do |
|
1190 | assert_select 'a[href=/issues/8]', :text => /Previous/ | |
|
1191 | assert_select 'a[href=/issues/12]', :text => /Next/ | |
|
1190 | assert_select 'a[href="/issues/8"]', :text => /Previous/ | |
|
1191 | assert_select 'a[href="/issues/12"]', :text => /Next/ | |
|
1192 | 1192 | end |
|
1193 | 1193 | end |
|
1194 | 1194 | |
@@ -1221,8 +1221,8 class IssuesControllerTest < ActionController::TestCase | |||
|
1221 | 1221 | assert_equal 7, assigns(:next_issue_id) |
|
1222 | 1222 | |
|
1223 | 1223 | assert_select 'div.next-prev-links' do |
|
1224 | assert_select 'a[href=/issues/2]', :text => /Previous/ | |
|
1225 | assert_select 'a[href=/issues/7]', :text => /Next/ | |
|
1224 | assert_select 'a[href="/issues/2"]', :text => /Previous/ | |
|
1225 | assert_select 'a[href="/issues/7"]', :text => /Next/ | |
|
1226 | 1226 | end |
|
1227 | 1227 | end |
|
1228 | 1228 | |
@@ -1240,7 +1240,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1240 | 1240 | |
|
1241 | 1241 | assert_select 'div.next-prev-links' do |
|
1242 | 1242 | assert_select 'a', :text => /Previous/, :count => 0 |
|
1243 | assert_select 'a[href=/issues/2]', :text => /Next/ | |
|
1243 | assert_select 'a[href="/issues/2"]', :text => /Next/ | |
|
1244 | 1244 | end |
|
1245 | 1245 | end |
|
1246 | 1246 | |
@@ -1276,8 +1276,8 class IssuesControllerTest < ActionController::TestCase | |||
|
1276 | 1276 | assert_equal 1, assigns(:next_issue_id) |
|
1277 | 1277 | |
|
1278 | 1278 | assert_select 'div.next-prev-links' do |
|
1279 | assert_select 'a[href=/issues/2]', :text => /Previous/ | |
|
1280 | assert_select 'a[href=/issues/1]', :text => /Next/ | |
|
1279 | assert_select 'a[href="/issues/2"]', :text => /Previous/ | |
|
1280 | assert_select 'a[href="/issues/1"]', :text => /Next/ | |
|
1281 | 1281 | end |
|
1282 | 1282 | end |
|
1283 | 1283 | |
@@ -1285,7 +1285,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1285 | 1285 | get :show, :id => 2 |
|
1286 | 1286 | assert_response :success |
|
1287 | 1287 | assert_select '.assigned-to' do |
|
1288 | assert_select 'a[href=/users/3]' | |
|
1288 | assert_select 'a[href="/users/3"]' | |
|
1289 | 1289 | end |
|
1290 | 1290 | end |
|
1291 | 1291 | |
@@ -1311,7 +1311,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1311 | 1311 | get :show, :id => 1 |
|
1312 | 1312 | assert_select 'div#watchers ul' do |
|
1313 | 1313 | assert_select 'li' do |
|
1314 | assert_select 'a[href=/users/2]' | |
|
1314 | assert_select 'a[href="/users/2"]' | |
|
1315 | 1315 | assert_select 'a img[alt=Delete]' |
|
1316 | 1316 | end |
|
1317 | 1317 | end |
@@ -1328,7 +1328,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1328 | 1328 | assert_select 'div#watchers ul' do |
|
1329 | 1329 | assert_select 'li' do |
|
1330 | 1330 | assert_select 'img.gravatar' |
|
1331 | assert_select 'a[href=/users/2]' | |
|
1331 | assert_select 'a[href="/users/2"]' | |
|
1332 | 1332 | assert_select 'a img[alt=Delete]' |
|
1333 | 1333 | end |
|
1334 | 1334 | end |
@@ -1343,8 +1343,8 class IssuesControllerTest < ActionController::TestCase | |||
|
1343 | 1343 | end |
|
1344 | 1344 | |
|
1345 | 1345 | assert_select 'div.thumbnails' do |
|
1346 | assert_select 'a[href=/attachments/16/testfile.png]' do | |
|
1347 | assert_select 'img[src=/attachments/thumbnail/16]' | |
|
1346 | assert_select 'a[href="/attachments/16/testfile.png"]' do | |
|
1347 | assert_select 'img[src="/attachments/thumbnail/16"]' | |
|
1348 | 1348 | end |
|
1349 | 1349 | end |
|
1350 | 1350 | end |
@@ -1511,7 +1511,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1511 | 1511 | # Be sure we don't display inactive IssuePriorities |
|
1512 | 1512 | assert ! IssuePriority.find(15).active? |
|
1513 | 1513 | assert_select 'select[name=?]', 'issue[priority_id]' do |
|
1514 | assert_select 'option[value=15]', 0 | |
|
1514 | assert_select 'option[value="15"]', 0 | |
|
1515 | 1515 | end |
|
1516 | 1516 | end |
|
1517 | 1517 | |
@@ -1551,9 +1551,9 class IssuesControllerTest < ActionController::TestCase | |||
|
1551 | 1551 | assert_response :success |
|
1552 | 1552 | assert_template 'new' |
|
1553 | 1553 | assert_select 'select[name=?]', 'issue[status_id]' do |
|
1554 | assert_select 'option[value=1][selected=selected]' | |
|
1554 | assert_select 'option[value="1"][selected=selected]' | |
|
1555 | 1555 | end |
|
1556 | assert_select 'input[name=was_default_status][value=1]' | |
|
1556 | assert_select 'input[name=was_default_status][value="1"]' | |
|
1557 | 1557 | end |
|
1558 | 1558 | |
|
1559 | 1559 | def test_get_new_with_list_custom_field |
@@ -1595,7 +1595,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1595 | 1595 | |
|
1596 | 1596 | assert_select 'select[name=?][multiple=multiple]', "issue[custom_field_values][#{field.id}][]" do |
|
1597 | 1597 | assert_select 'option', Project.find(1).users.count |
|
1598 | assert_select 'option[value=2]', :text => 'John Smith' | |
|
1598 | assert_select 'option[value="2"]', :text => 'John Smith' | |
|
1599 | 1599 | end |
|
1600 | 1600 | assert_select 'input[name=?][type=hidden][value=?]', "issue[custom_field_values][#{field.id}][]", '' |
|
1601 | 1601 | end |
@@ -1662,7 +1662,7 class IssuesControllerTest < ActionController::TestCase | |||
|
1662 | 1662 | assert_equal 'Custom field value', issue.custom_field_value(2) |
|
1663 | 1663 | |
|
1664 | 1664 | assert_select 'select[name=?]', 'issue[tracker_id]' do |
|
1665 | assert_select 'option[value=3][selected=selected]' | |
|
1665 | assert_select 'option[value="3"][selected=selected]' | |
|
1666 | 1666 | end |
|
1667 | 1667 | assert_select 'textarea[name=?]', 'issue[description]', :text => /Prefilled/ |
|
1668 | 1668 | assert_select 'input[name=?][value=?]', 'issue[custom_field_values][2]', 'Custom field value' |
@@ -2176,7 +2176,7 class IssuesControllerTest < ActionController::TestCase | |||
|
2176 | 2176 | |
|
2177 | 2177 | assert_select 'textarea[name=?]', 'issue[description]', :text => 'This is a description' |
|
2178 | 2178 | assert_select 'select[name=?]', 'issue[priority_id]' do |
|
2179 | assert_select 'option[value=6][selected=selected]', :text => 'High' | |
|
2179 | assert_select 'option[value="6"][selected=selected]', :text => 'High' | |
|
2180 | 2180 | end |
|
2181 | 2181 | # Custom fields |
|
2182 | 2182 | assert_select 'select[name=?]', 'issue[custom_field_values][1]' do |
@@ -2195,9 +2195,9 class IssuesControllerTest < ActionController::TestCase | |||
|
2195 | 2195 | assert_response :success |
|
2196 | 2196 | assert_template 'new' |
|
2197 | 2197 | |
|
2198 | assert_select 'input[name=?][value=2]:not(checked)', 'issue[watcher_user_ids][]' | |
|
2199 | assert_select 'input[name=?][value=3][checked=checked]', 'issue[watcher_user_ids][]' | |
|
2200 | assert_select 'input[name=?][value=8][checked=checked]', 'issue[watcher_user_ids][]' | |
|
2198 | assert_select 'input[name=?][value="2"]:not(checked)', 'issue[watcher_user_ids][]' | |
|
2199 | assert_select 'input[name=?][value="3"][checked=checked]', 'issue[watcher_user_ids][]' | |
|
2200 | assert_select 'input[name=?][value="8"][checked=checked]', 'issue[watcher_user_ids][]' | |
|
2201 | 2201 | end |
|
2202 | 2202 | |
|
2203 | 2203 | def test_post_create_should_ignore_non_safe_attributes |
@@ -2474,14 +2474,14 class IssuesControllerTest < ActionController::TestCase | |||
|
2474 | 2474 | |
|
2475 | 2475 | assert_select 'form[id=issue-form][action=/projects/ecookbook/issues]' do |
|
2476 | 2476 | assert_select 'select[name=?]', 'issue[project_id]' do |
|
2477 | assert_select 'option[value=1][selected=selected]', :text => 'eCookbook' | |
|
2478 | assert_select 'option[value=2]:not([selected])', :text => 'OnlineStore' | |
|
2477 | assert_select 'option[value="1"][selected=selected]', :text => 'eCookbook' | |
|
2478 | assert_select 'option[value="2"]:not([selected])', :text => 'OnlineStore' | |
|
2479 | 2479 | end |
|
2480 | assert_select 'input[name=copy_from][value=1]' | |
|
2480 | assert_select 'input[name=copy_from][value="1"]' | |
|
2481 | 2481 | end |
|
2482 | 2482 | |
|
2483 | 2483 | # "New issue" menu item should not link to copy |
|
2484 | assert_select '#main-menu a.new-issue[href=/projects/ecookbook/issues/new]' | |
|
2484 | assert_select '#main-menu a.new-issue[href="/projects/ecookbook/issues/new"]' | |
|
2485 | 2485 | end |
|
2486 | 2486 | |
|
2487 | 2487 | def test_new_as_copy_with_attachments_should_show_copy_attachments_checkbox |
@@ -2490,7 +2490,7 class IssuesControllerTest < ActionController::TestCase | |||
|
2490 | 2490 | assert issue.attachments.count > 0 |
|
2491 | 2491 | get :new, :project_id => 1, :copy_from => 3 |
|
2492 | 2492 | |
|
2493 | assert_select 'input[name=copy_attachments][type=checkbox][checked=checked][value=1]' | |
|
2493 | assert_select 'input[name=copy_attachments][type=checkbox][checked=checked][value="1"]' | |
|
2494 | 2494 | end |
|
2495 | 2495 | |
|
2496 | 2496 | def test_new_as_copy_without_attachments_should_not_show_copy_attachments_checkbox |
@@ -2507,7 +2507,7 class IssuesControllerTest < ActionController::TestCase | |||
|
2507 | 2507 | issue = Issue.generate_with_descendants! |
|
2508 | 2508 | get :new, :project_id => 1, :copy_from => issue.id |
|
2509 | 2509 | |
|
2510 | assert_select 'input[type=checkbox][name=copy_subtasks][checked=checked][value=1]' | |
|
2510 | assert_select 'input[type=checkbox][name=copy_subtasks][checked=checked][value="1"]' | |
|
2511 | 2511 | end |
|
2512 | 2512 | |
|
2513 | 2513 | def test_new_as_copy_with_invalid_issue_should_respond_with_404 |
@@ -2650,10 +2650,10 class IssuesControllerTest < ActionController::TestCase | |||
|
2650 | 2650 | |
|
2651 | 2651 | assert_select 'form#issue-form[action=/projects/ecookbook/issues]' do |
|
2652 | 2652 | assert_select 'select[name=?]', 'issue[project_id]' do |
|
2653 | assert_select 'option[value=1]:not([selected])', :text => 'eCookbook' | |
|
2654 | assert_select 'option[value=2][selected=selected]', :text => 'OnlineStore' | |
|
2653 | assert_select 'option[value="1"]:not([selected])', :text => 'eCookbook' | |
|
2654 | assert_select 'option[value="2"][selected=selected]', :text => 'OnlineStore' | |
|
2655 | 2655 | end |
|
2656 | assert_select 'input[name=copy_from][value=1]' | |
|
2656 | assert_select 'input[name=copy_from][value="1"]' | |
|
2657 | 2657 | end |
|
2658 | 2658 | end |
|
2659 | 2659 | |
@@ -2680,7 +2680,7 class IssuesControllerTest < ActionController::TestCase | |||
|
2680 | 2680 | # Be sure we don't display inactive IssuePriorities |
|
2681 | 2681 | assert ! IssuePriority.find(15).active? |
|
2682 | 2682 | assert_select 'select[name=?]', 'issue[priority_id]' do |
|
2683 | assert_select 'option[value=15]', 0 | |
|
2683 | assert_select 'option[value="15"]', 0 | |
|
2684 | 2684 | end |
|
2685 | 2685 | end |
|
2686 | 2686 | |
@@ -2712,17 +2712,17 class IssuesControllerTest < ActionController::TestCase | |||
|
2712 | 2712 | |
|
2713 | 2713 | assert_equal 5, issue.status_id |
|
2714 | 2714 | assert_select 'select[name=?]', 'issue[status_id]' do |
|
2715 | assert_select 'option[value=5][selected=selected]', :text => 'Closed' | |
|
2715 | assert_select 'option[value="5"][selected=selected]', :text => 'Closed' | |
|
2716 | 2716 | end |
|
2717 | 2717 | |
|
2718 | 2718 | assert_equal 7, issue.priority_id |
|
2719 | 2719 | assert_select 'select[name=?]', 'issue[priority_id]' do |
|
2720 | assert_select 'option[value=7][selected=selected]', :text => 'Urgent' | |
|
2720 | assert_select 'option[value="7"][selected=selected]', :text => 'Urgent' | |
|
2721 | 2721 | end |
|
2722 | 2722 | |
|
2723 | 2723 | assert_select 'input[name=?][value=2.5]', 'time_entry[hours]' |
|
2724 | 2724 | assert_select 'select[name=?]', 'time_entry[activity_id]' do |
|
2725 | assert_select 'option[value=10][selected=selected]', :text => 'Development' | |
|
2725 | assert_select 'option[value="10"][selected=selected]', :text => 'Development' | |
|
2726 | 2726 | end |
|
2727 | 2727 | assert_select 'input[name=?][value=test_get_edit_with_params]', 'time_entry[comments]' |
|
2728 | 2728 | end |
@@ -3302,7 +3302,7 class IssuesControllerTest < ActionController::TestCase | |||
|
3302 | 3302 | |
|
3303 | 3303 | assert_select 'form#bulk_edit_form[action=?]', '/issues/bulk_update' do |
|
3304 | 3304 | assert_select 'input[name=?]', 'ids[]', 2 |
|
3305 | assert_select 'input[name=?][value=1][type=hidden]', 'ids[]' | |
|
3305 | assert_select 'input[name=?][value="1"][type=hidden]', 'ids[]' | |
|
3306 | 3306 | |
|
3307 | 3307 | assert_select 'select[name=?]', 'issue[project_id]' |
|
3308 | 3308 | assert_select 'input[name=?]', 'issue[parent_issue_id]' |
@@ -3320,7 +3320,7 class IssuesControllerTest < ActionController::TestCase | |||
|
3320 | 3320 | # Be sure we don't display inactive IssuePriorities |
|
3321 | 3321 | assert ! IssuePriority.find(15).active? |
|
3322 | 3322 | assert_select 'select[name=?]', 'issue[priority_id]' do |
|
3323 | assert_select 'option[value=15]', 0 | |
|
3323 | assert_select 'option[value="15"]', 0 | |
|
3324 | 3324 | end |
|
3325 | 3325 | end |
|
3326 | 3326 | end |
@@ -3736,7 +3736,7 class IssuesControllerTest < ActionController::TestCase | |||
|
3736 | 3736 | assert_response :success |
|
3737 | 3737 | assert_template 'bulk_edit' |
|
3738 | 3738 | assert_select 'select[name=?]', 'issue[tracker_id]' do |
|
3739 | assert_select 'option[value=2][selected=selected]' | |
|
3739 | assert_select 'option[value="2"][selected=selected]' | |
|
3740 | 3740 | end |
|
3741 | 3741 | assert_select 'input[name=?][value=?]', 'issue[start_date]', 'foo' |
|
3742 | 3742 | end |
@@ -4045,7 +4045,7 class IssuesControllerTest < ActionController::TestCase | |||
|
4045 | 4045 | get :index |
|
4046 | 4046 | |
|
4047 | 4047 | assert_select 'div#quick-search form' do |
|
4048 | assert_select 'input[name=issues][value=1][type=hidden]' | |
|
4048 | assert_select 'input[name=issues][value="1"][type=hidden]' | |
|
4049 | 4049 | end |
|
4050 | 4050 | end |
|
4051 | 4051 | end |
@@ -75,7 +75,7 class IssuesControllerTransactionTest < ActionController::TestCase | |||
|
75 | 75 | assert_select 'input[name=?][value=?]', 'conflict_resolution', 'add_notes' |
|
76 | 76 | assert_select 'label' do |
|
77 | 77 | assert_select 'input[name=?][value=?]', 'conflict_resolution', 'cancel' |
|
78 | assert_select 'a[href=/issues/2]' | |
|
78 | assert_select 'a[href="/issues/2"]' | |
|
79 | 79 | end |
|
80 | 80 | end |
|
81 | 81 |
@@ -46,7 +46,7 class MyControllerTest < ActionController::TestCase | |||
|
46 | 46 | get :page |
|
47 | 47 | assert_response :success |
|
48 | 48 | assert_select 'tr.time-entry' do |
|
49 | assert_select 'td.subject a[href=/issues/1]' | |
|
49 | assert_select 'td.subject a[href="/issues/1"]' | |
|
50 | 50 | assert_select 'td.hours', :text => '2.50' |
|
51 | 51 | end |
|
52 | 52 | end |
@@ -119,7 +119,7 class MyControllerTest < ActionController::TestCase | |||
|
119 | 119 | |
|
120 | 120 | def test_my_account_should_show_destroy_link |
|
121 | 121 | get :account |
|
122 | assert_select 'a[href=/my/account/destroy]' | |
|
122 | assert_select 'a[href="/my/account/destroy"]' | |
|
123 | 123 | end |
|
124 | 124 | |
|
125 | 125 | def test_get_destroy_should_display_the_destroy_confirmation |
@@ -28,7 +28,7 class PrincipalMembershipsControllerTest < ActionController::TestCase | |||
|
28 | 28 | get :new, :user_id => 7 |
|
29 | 29 | assert_response :success |
|
30 | 30 | assert_select 'label', :text => 'eCookbook' do |
|
31 | assert_select 'input[name=?][value=1]:not([disabled])', 'membership[project_ids][]' | |
|
31 | assert_select 'input[name=?][value="1"]:not([disabled])', 'membership[project_ids][]' | |
|
32 | 32 | end |
|
33 | 33 | end |
|
34 | 34 | |
@@ -38,7 +38,7 class PrincipalMembershipsControllerTest < ActionController::TestCase | |||
|
38 | 38 | get :new, :user_id => 7 |
|
39 | 39 | assert_response :success |
|
40 | 40 | assert_select 'label', :text => 'eCookbook' do |
|
41 | assert_select 'input[name=?][value=1][disabled=disabled]', 'membership[project_ids][]' | |
|
41 | assert_select 'input[name=?][value="1"][disabled=disabled]', 'membership[project_ids][]' | |
|
42 | 42 | end |
|
43 | 43 | end |
|
44 | 44 |
@@ -103,9 +103,9 class ProjectsControllerTest < ActionController::TestCase | |||
|
103 | 103 | |
|
104 | 104 | assert_select 'select[name=?]', 'project[parent_id]' do |
|
105 | 105 | # parent project selected |
|
106 | assert_select 'option[value=1][selected=selected]' | |
|
106 | assert_select 'option[value="1"][selected=selected]' | |
|
107 | 107 | # no empty value |
|
108 | assert_select 'option[value=]', 0 | |
|
108 | assert_select 'option[value=""]', 0 | |
|
109 | 109 | end |
|
110 | 110 | end |
|
111 | 111 |
@@ -35,7 +35,7 class QueriesControllerTest < ActionController::TestCase | |||
|
35 | 35 | get :new, :project_id => 1 |
|
36 | 36 | assert_response :success |
|
37 | 37 | assert_template 'new' |
|
38 | assert_select 'input[name=?][value=0][checked=checked]', 'query[visibility]' | |
|
38 | assert_select 'input[name=?][value="0"][checked=checked]', 'query[visibility]' | |
|
39 | 39 | assert_tag :tag => 'input', :attributes => { :type => 'checkbox', |
|
40 | 40 | :name => 'query_is_for_all', |
|
41 | 41 | :checked => nil, |
@@ -197,7 +197,7 class QueriesControllerTest < ActionController::TestCase | |||
|
197 | 197 | get :edit, :id => 4 |
|
198 | 198 | assert_response :success |
|
199 | 199 | assert_template 'edit' |
|
200 | assert_select 'input[name=?][value=2][checked=checked]', 'query[visibility]' | |
|
200 | assert_select 'input[name=?][value="2"][checked=checked]', 'query[visibility]' | |
|
201 | 201 | assert_tag :tag => 'input', :attributes => { :type => 'checkbox', |
|
202 | 202 | :name => 'query_is_for_all', |
|
203 | 203 | :checked => 'checked', |
@@ -233,7 +233,7 class QueriesControllerTest < ActionController::TestCase | |||
|
233 | 233 | get :edit, :id => 1 |
|
234 | 234 | assert_response :success |
|
235 | 235 | assert_template 'edit' |
|
236 | assert_select 'input[name=?][value=2][checked=checked]', 'query[visibility]' | |
|
236 | assert_select 'input[name=?][value="2"][checked=checked]', 'query[visibility]' | |
|
237 | 237 | assert_tag :tag => 'input', :attributes => { :type => 'checkbox', |
|
238 | 238 | :name => 'query_is_for_all', |
|
239 | 239 | :checked => nil, |
@@ -62,7 +62,7 class RepositoriesSubversionControllerTest < ActionController::TestCase | |||
|
62 | 62 | entry = assigns(:entries).detect {|e| e.name == 'subversion_test'} |
|
63 | 63 | assert_not_nil entry |
|
64 | 64 | assert_equal 'dir', entry.kind |
|
65 | assert_select 'tr.dir a[href=/projects/subproject1/repository/show/subversion_test]' | |
|
65 | assert_select 'tr.dir a[href="/projects/subproject1/repository/show/subversion_test"]' | |
|
66 | 66 | |
|
67 | 67 | assert_tag 'input', :attributes => {:name => 'rev'} |
|
68 | 68 | assert_tag 'a', :content => 'Statistics' |
@@ -80,9 +80,9 class RepositoriesSubversionControllerTest < ActionController::TestCase | |||
|
80 | 80 | get :show, :id => PRJ_ID, :repository_id => 'svn' |
|
81 | 81 | assert_response :success |
|
82 | 82 | assert_template 'show' |
|
83 | assert_select 'tr.dir a[href=/projects/subproject1/repository/svn/show/subversion_test]' | |
|
83 | assert_select 'tr.dir a[href="/projects/subproject1/repository/svn/show/subversion_test"]' | |
|
84 | 84 | # Repository menu should link to the main repo |
|
85 | assert_select '#main-menu a[href=/projects/subproject1/repository]' | |
|
85 | assert_select '#main-menu a[href="/projects/subproject1/repository"]' | |
|
86 | 86 | end |
|
87 | 87 | |
|
88 | 88 | def test_browse_directory |
@@ -55,7 +55,7 class RolesControllerTest < ActionController::TestCase | |||
|
55 | 55 | |
|
56 | 56 | assert_select 'form' do |
|
57 | 57 | # blank name |
|
58 | assert_select 'input[name=?][value=]', 'role[name]' | |
|
58 | assert_select 'input[name=?][value=""]', 'role[name]' | |
|
59 | 59 | # edit_project permission checked |
|
60 | 60 | assert_select 'input[type=checkbox][name=?][value=edit_project][checked=checked]', 'role[permissions][]' |
|
61 | 61 | # add_project permission not checked |
@@ -63,7 +63,7 class RolesControllerTest < ActionController::TestCase | |||
|
63 | 63 | assert_select 'input[type=checkbox][name=?][value=add_project][checked=checked]', 'role[permissions][]', 0 |
|
64 | 64 | # workflow copy selected |
|
65 | 65 | assert_select 'select[name=?]', 'copy_workflow_from' do |
|
66 | assert_select 'option[value=2][selected=selected]' | |
|
66 | assert_select 'option[value="2"][selected=selected]' | |
|
67 | 67 | end |
|
68 | 68 | end |
|
69 | 69 | end |
@@ -93,19 +93,19 class SettingsControllerTest < ActionController::TestCase | |||
|
93 | 93 | assert_select 'tr.commit-keywords:nth-child(1)' do |
|
94 | 94 | assert_select 'input[name=?][value=?]', 'settings[commit_update_keywords][keywords][]', 'fixes, resolves' |
|
95 | 95 | assert_select 'select[name=?]', 'settings[commit_update_keywords][status_id][]' do |
|
96 | assert_select 'option[value=3][selected=selected]' | |
|
96 | assert_select 'option[value="3"][selected=selected]' | |
|
97 | 97 | end |
|
98 | 98 | end |
|
99 | 99 | assert_select 'tr.commit-keywords:nth-child(2)' do |
|
100 | 100 | assert_select 'input[name=?][value=?]', 'settings[commit_update_keywords][keywords][]', 'closes' |
|
101 | 101 | assert_select 'select[name=?]', 'settings[commit_update_keywords][status_id][]' do |
|
102 | assert_select 'option[value=5][selected=selected]', :text => 'Closed' | |
|
102 | assert_select 'option[value="5"][selected=selected]', :text => 'Closed' | |
|
103 | 103 | end |
|
104 | 104 | assert_select 'select[name=?]', 'settings[commit_update_keywords][done_ratio][]' do |
|
105 | assert_select 'option[value=100][selected=selected]', :text => '100 %' | |
|
105 | assert_select 'option[value="100"][selected=selected]', :text => '100 %' | |
|
106 | 106 | end |
|
107 | 107 | assert_select 'select[name=?]', 'settings[commit_update_keywords][if_tracker_id][]' do |
|
108 | assert_select 'option[value=2][selected=selected]', :text => 'Feature request' | |
|
108 | assert_select 'option[value="2"][selected=selected]', :text => 'Feature request' | |
|
109 | 109 | end |
|
110 | 110 | end |
|
111 | 111 | end |
@@ -37,7 +37,7 class TimelogControllerTest < ActionController::TestCase | |||
|
37 | 37 | assert_select 'input[name=?][type=hidden]', 'issue_id', 0 |
|
38 | 38 | assert_select 'select[name=?]', 'time_entry[project_id]' do |
|
39 | 39 | # blank option for project |
|
40 | assert_select 'option[value=]' | |
|
40 | assert_select 'option[value=""]' | |
|
41 | 41 | end |
|
42 | 42 | end |
|
43 | 43 | |
@@ -67,7 +67,7 class TimelogControllerTest < ActionController::TestCase | |||
|
67 | 67 | assert_response :success |
|
68 | 68 | assert_template 'new' |
|
69 | 69 | assert_select 'select[name=?]', 'time_entry[project_id]' do |
|
70 | assert_select 'option[value=1][selected=selected]' | |
|
70 | assert_select 'option[value="1"][selected=selected]' | |
|
71 | 71 | end |
|
72 | 72 | end |
|
73 | 73 | |
@@ -361,8 +361,8 class TimelogControllerTest < ActionController::TestCase | |||
|
361 | 361 | |
|
362 | 362 | # Activities |
|
363 | 363 | assert_select 'select[name=?]', 'time_entry[activity_id]' do |
|
364 | assert_select 'option[value=]', :text => '(No change)' | |
|
365 | assert_select 'option[value=9]', :text => 'Design' | |
|
364 | assert_select 'option[value=""]', :text => '(No change)' | |
|
365 | assert_select 'option[value="9"]', :text => 'Design' | |
|
366 | 366 | end |
|
367 | 367 | end |
|
368 | 368 | end |
@@ -127,7 +127,7 class TrackersControllerTest < ActionController::TestCase | |||
|
127 | 127 | assert_select 'input[name=?][value=category_id]', 'tracker[core_fields][]' |
|
128 | 128 | assert_select 'input[name=?][value=category_id][checked=checked]', 'tracker[core_fields][]', 0 |
|
129 | 129 | |
|
130 | assert_select 'input[name=?][value=][type=hidden]', 'tracker[core_fields][]' | |
|
130 | assert_select 'input[name=?][value=""][type=hidden]', 'tracker[core_fields][]' | |
|
131 | 131 | end |
|
132 | 132 | |
|
133 | 133 | def test_update |
@@ -187,10 +187,10 class TrackersControllerTest < ActionController::TestCase | |||
|
187 | 187 | |
|
188 | 188 | assert_select 'form' do |
|
189 | 189 | assert_select 'input[type=checkbox][name=?][value=assigned_to_id]', 'trackers[1][core_fields][]' |
|
190 | assert_select 'input[type=checkbox][name=?][value=2]', 'trackers[1][custom_field_ids][]' | |
|
190 | assert_select 'input[type=checkbox][name=?][value="2"]', 'trackers[1][custom_field_ids][]' | |
|
191 | 191 | |
|
192 | assert_select 'input[type=hidden][name=?][value=]', 'trackers[1][core_fields][]' | |
|
193 | assert_select 'input[type=hidden][name=?][value=]', 'trackers[1][custom_field_ids][]' | |
|
192 | assert_select 'input[type=hidden][name=?][value=""]', 'trackers[1][core_fields][]' | |
|
193 | assert_select 'input[type=hidden][name=?][value=""]', 'trackers[1][custom_field_ids][]' | |
|
194 | 194 | end |
|
195 | 195 | end |
|
196 | 196 |
@@ -64,7 +64,7 class UsersControllerTest < ActionController::TestCase | |||
|
64 | 64 | assert users.any? |
|
65 | 65 | assert_equal([], (users - Group.find(10).users)) |
|
66 | 66 | assert_select 'select[name=group_id]' do |
|
67 | assert_select 'option[value=10][selected=selected]' | |
|
67 | assert_select 'option[value="10"][selected=selected]' | |
|
68 | 68 | end |
|
69 | 69 | end |
|
70 | 70 | |
@@ -263,7 +263,7 class UsersControllerTest < ActionController::TestCase | |||
|
263 | 263 | assert_template 'new' |
|
264 | 264 | |
|
265 | 265 | assert_select 'select#pref_time_zone option[selected=selected]', :text => /Paris/ |
|
266 | assert_select 'input#pref_no_self_notified[value=1][checked=checked]' | |
|
266 | assert_select 'input#pref_no_self_notified[value="1"][checked=checked]' | |
|
267 | 267 | end |
|
268 | 268 | |
|
269 | 269 | def test_edit |
@@ -179,10 +179,10 class WatchersControllerTest < ActionController::TestCase | |||
|
179 | 179 | xhr :get, :autocomplete_for_user, :q => 'mi', :project_id => 'ecookbook' |
|
180 | 180 | assert_response :success |
|
181 | 181 | assert_select 'input', :count => 4 |
|
182 | assert_select 'input[name=?][value=1]', 'watcher[user_ids][]' | |
|
183 | assert_select 'input[name=?][value=2]', 'watcher[user_ids][]' | |
|
184 | assert_select 'input[name=?][value=8]', 'watcher[user_ids][]' | |
|
185 | assert_select 'input[name=?][value=9]', 'watcher[user_ids][]' | |
|
182 | assert_select 'input[name=?][value="1"]', 'watcher[user_ids][]' | |
|
183 | assert_select 'input[name=?][value="2"]', 'watcher[user_ids][]' | |
|
184 | assert_select 'input[name=?][value="8"]', 'watcher[user_ids][]' | |
|
185 | assert_select 'input[name=?][value="9"]', 'watcher[user_ids][]' | |
|
186 | 186 | end |
|
187 | 187 | |
|
188 | 188 | def test_search_non_member_on_create |
@@ -202,9 +202,9 class WatchersControllerTest < ActionController::TestCase | |||
|
202 | 202 | :object_type => 'issue', :project_id => 'ecookbook' |
|
203 | 203 | assert_response :success |
|
204 | 204 | assert_select 'input', :count => 3 |
|
205 | assert_select 'input[name=?][value=2]', 'watcher[user_ids][]' | |
|
206 | assert_select 'input[name=?][value=8]', 'watcher[user_ids][]' | |
|
207 | assert_select 'input[name=?][value=9]', 'watcher[user_ids][]' | |
|
205 | assert_select 'input[name=?][value="2"]', 'watcher[user_ids][]' | |
|
206 | assert_select 'input[name=?][value="8"]', 'watcher[user_ids][]' | |
|
207 | assert_select 'input[name=?][value="9"]', 'watcher[user_ids][]' | |
|
208 | 208 | end |
|
209 | 209 | |
|
210 | 210 | def test_search_and_add_non_member_on_update |
@@ -116,7 +116,7 class WelcomeControllerTest < ActionController::TestCase | |||
|
116 | 116 | @request.session[:user_id] = 2 |
|
117 | 117 | |
|
118 | 118 | get :index |
|
119 | assert_select 'a[href=/logout][data-method=post]', :text => 'Sign out' | |
|
119 | assert_select 'a[href="/logout"][data-method=post]', :text => 'Sign out' | |
|
120 | 120 | end |
|
121 | 121 | |
|
122 | 122 | def test_call_hook_mixed_in |
@@ -55,9 +55,9 class WorkflowsControllerTest < ActionController::TestCase | |||
|
55 | 55 | assert_equal [2, 3, 5], assigns(:statuses).collect(&:id) |
|
56 | 56 | |
|
57 | 57 | # allowed transitions |
|
58 | assert_select 'input[type=checkbox][name=?][value=1][checked=checked]', 'transitions[3][5][always]' | |
|
58 | assert_select 'input[type=checkbox][name=?][value="1"][checked=checked]', 'transitions[3][5][always]' | |
|
59 | 59 | # not allowed |
|
60 | assert_select 'input[type=checkbox][name=?][value=1]:not([checked=checked])', 'transitions[3][2][always]' | |
|
60 | assert_select 'input[type=checkbox][name=?][value="1"]:not([checked=checked])', 'transitions[3][2][always]' | |
|
61 | 61 | # unused |
|
62 | 62 | assert_select 'input[type=checkbox][name=?]', 'transitions[1][1][always]', 0 |
|
63 | 63 | end |
@@ -135,13 +135,13 class WorkflowsControllerTest < ActionController::TestCase | |||
|
135 | 135 | assert_response :success |
|
136 | 136 | assert_template 'permissions' |
|
137 | 137 | |
|
138 | assert_select 'input[name=?][value=1]', 'role_id[]' | |
|
139 | assert_select 'input[name=?][value=2]', 'tracker_id[]' | |
|
138 | assert_select 'input[name=?][value="1"]', 'role_id[]' | |
|
139 | assert_select 'input[name=?][value="2"]', 'tracker_id[]' | |
|
140 | 140 | |
|
141 | 141 | # Required field |
|
142 | 142 | assert_select 'select[name=?]', 'permissions[2][assigned_to_id]' do |
|
143 | assert_select 'option[value=]' | |
|
144 | assert_select 'option[value=][selected=selected]', 0 | |
|
143 | assert_select 'option[value=""]' | |
|
144 | assert_select 'option[value=""][selected=selected]', 0 | |
|
145 | 145 | assert_select 'option[value=readonly]', :text => 'Read-only' |
|
146 | 146 | assert_select 'option[value=readonly][selected=selected]', 0 |
|
147 | 147 | assert_select 'option[value=required]', :text => 'Required' |
@@ -150,8 +150,8 class WorkflowsControllerTest < ActionController::TestCase | |||
|
150 | 150 | |
|
151 | 151 | # Read-only field |
|
152 | 152 | assert_select 'select[name=?]', 'permissions[3][fixed_version_id]' do |
|
153 | assert_select 'option[value=]' | |
|
154 | assert_select 'option[value=][selected=selected]', 0 | |
|
153 | assert_select 'option[value=""]' | |
|
154 | assert_select 'option[value=""][selected=selected]', 0 | |
|
155 | 155 | assert_select 'option[value=readonly]', :text => 'Read-only' |
|
156 | 156 | assert_select 'option[value=readonly][selected=selected]' |
|
157 | 157 | assert_select 'option[value=required]', :text => 'Required' |
@@ -160,8 +160,8 class WorkflowsControllerTest < ActionController::TestCase | |||
|
160 | 160 | |
|
161 | 161 | # Other field |
|
162 | 162 | assert_select 'select[name=?]', 'permissions[3][due_date]' do |
|
163 | assert_select 'option[value=]' | |
|
164 | assert_select 'option[value=][selected=selected]', 0 | |
|
163 | assert_select 'option[value=""]' | |
|
164 | assert_select 'option[value=""][selected=selected]', 0 | |
|
165 | 165 | assert_select 'option[value=readonly]', :text => 'Read-only' |
|
166 | 166 | assert_select 'option[value=readonly][selected=selected]', 0 |
|
167 | 167 | assert_select 'option[value=required]', :text => 'Required' |
@@ -179,7 +179,7 class WorkflowsControllerTest < ActionController::TestCase | |||
|
179 | 179 | # Custom field that is always required |
|
180 | 180 | # The default option is "(Required)" |
|
181 | 181 | assert_select 'select[name=?]', "permissions[3][#{cf.id}]" do |
|
182 | assert_select 'option[value=]' | |
|
182 | assert_select 'option[value=""]' | |
|
183 | 183 | assert_select 'option[value=readonly]', :text => 'Read-only' |
|
184 | 184 | assert_select 'option[value=required]', 0 |
|
185 | 185 | end |
@@ -198,7 +198,7 class WorkflowsControllerTest < ActionController::TestCase | |||
|
198 | 198 | assert_select 'select[name=?]:not(.disabled)', "permissions[1][#{cf3.id}]" |
|
199 | 199 | |
|
200 | 200 | assert_select 'select[name=?][disabled=disabled]', "permissions[1][#{cf2.id}]" do |
|
201 | assert_select 'option[value=][selected=selected]', :text => 'Hidden' | |
|
201 | assert_select 'option[value=""][selected=selected]', :text => 'Hidden' | |
|
202 | 202 | end |
|
203 | 203 | end |
|
204 | 204 | |
@@ -277,16 +277,16 class WorkflowsControllerTest < ActionController::TestCase | |||
|
277 | 277 | assert_response :success |
|
278 | 278 | assert_template 'copy' |
|
279 | 279 | assert_select 'select[name=source_tracker_id]' do |
|
280 | assert_select 'option[value=1]', :text => 'Bug' | |
|
280 | assert_select 'option[value="1"]', :text => 'Bug' | |
|
281 | 281 | end |
|
282 | 282 | assert_select 'select[name=source_role_id]' do |
|
283 | assert_select 'option[value=2]', :text => 'Developer' | |
|
283 | assert_select 'option[value="2"]', :text => 'Developer' | |
|
284 | 284 | end |
|
285 | 285 | assert_select 'select[name=?]', 'target_tracker_ids[]' do |
|
286 | assert_select 'option[value=3]', :text => 'Support request' | |
|
286 | assert_select 'option[value="3"]', :text => 'Support request' | |
|
287 | 287 | end |
|
288 | 288 | assert_select 'select[name=?]', 'target_role_ids[]' do |
|
289 | assert_select 'option[value=1]', :text => 'Manager' | |
|
289 | assert_select 'option[value="1"]', :text => 'Manager' | |
|
290 | 290 | end |
|
291 | 291 | end |
|
292 | 292 |
@@ -269,7 +269,7 class AccountTest < ActionDispatch::IntegrationTest | |||
|
269 | 269 | follow_redirect! |
|
270 | 270 | assert_response :success |
|
271 | 271 | assert_select 'div.flash', :text => /new activation email/ |
|
272 | assert_select 'div.flash a[href=/account/activation_email]' | |
|
272 | assert_select 'div.flash a[href="/account/activation_email"]' | |
|
273 | 273 | |
|
274 | 274 | # request a new action activation email |
|
275 | 275 | assert_difference 'ActionMailer::Base.deliveries.size' do |
@@ -101,8 +101,8 VIEW | |||
|
101 | 101 | assert_response :success |
|
102 | 102 | assert_select 'p', :text => 'ContentForInsideHook content' |
|
103 | 103 | assert_select 'head' do |
|
104 | assert_select 'script[src=/plugin_assets/test_plugin/javascripts/test_plugin.js]' | |
|
105 | assert_select 'link[href=/plugin_assets/test_plugin/stylesheets/test_plugin.css]' | |
|
104 | assert_select 'script[src="/plugin_assets/test_plugin/javascripts/test_plugin.js"]' | |
|
105 | assert_select 'link[href="/plugin_assets/test_plugin/stylesheets/test_plugin.css"]' | |
|
106 | 106 | end |
|
107 | 107 | end |
|
108 | 108 |
@@ -33,8 +33,8 class Redmine::BoolFieldFormatTest < ActionView::TestCase | |||
|
33 | 33 | tag = field.format.edit_tag(self, 'abc', 'xyz', value) |
|
34 | 34 | assert_select_in tag, 'input[name=xyz]', 2 |
|
35 | 35 | assert_select_in tag, 'input[id=abc]', 1 |
|
36 | assert_select_in tag, 'input[type=hidden][value=0]' | |
|
37 | assert_select_in tag, 'input[type=checkbox][value=1]' | |
|
36 | assert_select_in tag, 'input[type=hidden][value="0"]' | |
|
37 | assert_select_in tag, 'input[type=checkbox][value="1"]' | |
|
38 | 38 | end |
|
39 | 39 | |
|
40 | 40 | def test_check_box_should_be_checked_when_value_is_set |
@@ -42,7 +42,7 class Redmine::BoolFieldFormatTest < ActionView::TestCase | |||
|
42 | 42 | value = CustomFieldValue.new(:custom_field => field, :customized => Issue.new, :value => '1') |
|
43 | 43 | |
|
44 | 44 | tag = field.format.edit_tag(self, 'abc', 'xyz', value) |
|
45 | assert_select_in tag, 'input[type=checkbox][value=1][checked=checked]' | |
|
45 | assert_select_in tag, 'input[type=checkbox][value="1"][checked=checked]' | |
|
46 | 46 | end |
|
47 | 47 | |
|
48 | 48 | def test_radio_style_should_render_edit_tag_as_radio_buttons |
@@ -52,7 +52,7 class Redmine::ListFieldFormatTest < ActionView::TestCase | |||
|
52 | 52 | tag = field.format.edit_tag(self, 'id', 'name', value) |
|
53 | 53 | assert_select_in tag, 'select' do |
|
54 | 54 | assert_select 'option', 3 |
|
55 | assert_select 'option[value=]' | |
|
55 | assert_select 'option[value=""]' | |
|
56 | 56 | assert_select 'option[value=Foo]', :text => 'Foo' |
|
57 | 57 | assert_select 'option[value=Bar]', :text => 'Bar' |
|
58 | 58 | end |
@@ -91,7 +91,7 class Redmine::ListFieldFormatTest < ActionView::TestCase | |||
|
91 | 91 | assert_select_in tag, 'span' do |
|
92 | 92 | assert_select 'input[type=radio]', 3 |
|
93 | 93 | assert_select 'label', :text => '(none)' do |
|
94 | assert_select 'input[value=]' | |
|
94 | assert_select 'input[value=""]' | |
|
95 | 95 | end |
|
96 | 96 | assert_select 'label', :text => 'Foo' do |
|
97 | 97 | assert_select 'input[value=Foo]' |
General Comments 0
You need to be logged in to leave comments.
Login now