@@ -1278,9 +1278,7 class QueryTest < ActiveSupport::TestCase | |||
|
1278 | 1278 | end |
|
1279 | 1279 | end |
|
1280 | 1280 | |
|
1281 | context "#statement" do | |
|
1282 | context "with 'member_of_group' filter" do | |
|
1283 | setup do | |
|
1281 | def setup_member_of_group | |
|
1284 | 1282 |
|
|
1285 | 1283 |
|
|
1286 | 1284 |
|
@@ -1294,18 +1292,19 class QueryTest < ActiveSupport::TestCase | |||
|
1294 | 1292 |
|
|
1295 | 1293 |
|
|
1296 | 1294 | |
|
1295 | @query = IssueQuery.new(:name => '_') | |
|
1297 | 1296 |
|
|
1298 | 1297 | |
|
1299 |
|
|
|
1300 | @query = IssueQuery.new(:name => '_') | |
|
1298 | test "member_of_group filter should search assigned to for users in the group" do | |
|
1299 | setup_member_of_group | |
|
1301 | 1300 |
|
|
1302 | 1301 | |
|
1303 | 1302 |
|
|
1304 | 1303 |
|
|
1305 | 1304 |
|
|
1306 | 1305 | |
|
1307 |
|
|
|
1308 | @query = IssueQuery.new(:name => '_') | |
|
1306 | test "member_of_group filter should search not assigned to any group member (none)" do | |
|
1307 | setup_member_of_group | |
|
1309 | 1308 |
|
|
1310 | 1309 | |
|
1311 | 1310 |
|
@@ -1313,8 +1312,8 class QueryTest < ActiveSupport::TestCase | |||
|
1313 | 1312 |
|
|
1314 | 1313 |
|
|
1315 | 1314 | |
|
1316 |
|
|
|
1317 | @query = IssueQuery.new(:name => '_') | |
|
1315 | test "member_of_group filter should search assigned to any group member (all)" do | |
|
1316 | setup_member_of_group | |
|
1318 | 1317 |
|
|
1319 | 1318 | |
|
1320 | 1319 |
|
@@ -1322,25 +1321,23 class QueryTest < ActiveSupport::TestCase | |||
|
1322 | 1321 |
|
|
1323 | 1322 |
|
|
1324 | 1323 | |
|
1325 |
|
|
|
1324 | test "member_of_group filter should return an empty set with = empty group" do | |
|
1325 | setup_member_of_group | |
|
1326 | 1326 |
|
|
1327 | @query = IssueQuery.new(:name => '_') | |
|
1328 | 1327 |
|
|
1329 | 1328 | |
|
1330 | 1329 |
|
|
1331 | 1330 |
|
|
1332 | 1331 | |
|
1333 |
|
|
|
1332 | test "member_of_group filter should return issues with ! empty group" do | |
|
1333 | setup_member_of_group | |
|
1334 | 1334 |
|
|
1335 | @query = IssueQuery.new(:name => '_') | |
|
1336 | 1335 |
|
|
1337 | 1336 | |
|
1338 | 1337 |
|
|
1339 | 1338 |
|
|
1340 | end | |
|
1341 | 1339 | |
|
1342 | context "with 'assigned_to_role' filter" do | |
|
1343 | setup do | |
|
1340 | def setup_assigned_to_role | |
|
1344 | 1341 |
|
|
1345 | 1342 |
|
|
1346 | 1343 | |
@@ -1358,63 +1355,62 class QueryTest < ActiveSupport::TestCase | |||
|
1358 | 1355 |
|
|
1359 | 1356 |
|
|
1360 | 1357 |
|
|
1361 | end | |
|
1362 | 1358 | |
|
1363 | should "search assigned to for users with the Role" do | |
|
1364 | 1359 |
|
|
1360 | end | |
|
1361 | ||
|
1362 | test "assigned_to_role filter should search assigned to for users with the Role" do | |
|
1363 | setup_assigned_to_role | |
|
1365 | 1364 |
|
|
1366 | 1365 | |
|
1367 | 1366 |
|
|
1368 | 1367 |
|
|
1369 | 1368 | |
|
1370 |
|
|
|
1369 | test "assigned_to_role filter should search assigned to for users with the Role on the issue project" do | |
|
1370 | setup_assigned_to_role | |
|
1371 | 1371 |
|
|
1372 | 1372 |
|
|
1373 | ||
|
1374 | @query = IssueQuery.new(:name => '_', :project => @project) | |
|
1375 | 1373 |
|
|
1376 | 1374 | |
|
1377 | 1375 |
|
|
1378 | 1376 |
|
|
1379 | 1377 | |
|
1380 |
|
|
|
1378 | test "assigned_to_role filter should return an empty set with empty role" do | |
|
1379 | setup_assigned_to_role | |
|
1381 | 1380 |
|
|
1382 | @query = IssueQuery.new(:name => '_', :project => @project) | |
|
1383 | 1381 |
|
|
1384 | 1382 | |
|
1385 | 1383 |
|
|
1386 | 1384 |
|
|
1387 | 1385 | |
|
1388 |
|
|
|
1389 | @query = IssueQuery.new(:name => '_', :project => @project) | |
|
1386 | test "assigned_to_role filter should search assigned to for users without the Role" do | |
|
1387 | setup_assigned_to_role | |
|
1390 | 1388 |
|
|
1391 | 1389 | |
|
1392 | 1390 |
|
|
1393 | 1391 |
|
|
1394 | 1392 | |
|
1395 |
|
|
|
1396 | @query = IssueQuery.new(:name => '_', :project => @project) | |
|
1393 | test "assigned_to_role filter should search assigned to for users not assigned to any Role (none)" do | |
|
1394 | setup_assigned_to_role | |
|
1397 | 1395 |
|
|
1398 | 1396 | |
|
1399 | 1397 |
|
|
1400 | 1398 |
|
|
1401 | 1399 | |
|
1402 |
|
|
|
1403 | @query = IssueQuery.new(:name => '_', :project => @project) | |
|
1400 | test "assigned_to_role filter should search assigned to for users assigned to any Role (all)" do | |
|
1401 | setup_assigned_to_role | |
|
1404 | 1402 |
|
|
1405 | 1403 | |
|
1406 | 1404 |
|
|
1407 | 1405 |
|
|
1408 | 1406 | |
|
1409 |
|
|
|
1407 | test "assigned_to_role filter should return issues with ! empty role" do | |
|
1408 | setup_assigned_to_role | |
|
1410 | 1409 |
|
|
1411 | @query = IssueQuery.new(:name => '_', :project => @project) | |
|
1412 | 1410 |
|
|
1413 | 1411 | |
|
1414 | 1412 |
|
|
1415 | 1413 |
|
|
1416 | end | |
|
1417 | end | |
|
1418 | 1414 | |
|
1419 | 1415 | def test_query_column_should_accept_a_symbol_as_caption |
|
1420 | 1416 | set_language_if_valid 'en' |
General Comments 0
You need to be logged in to leave comments.
Login now