summaryrefslogtreecommitdiffstats
path: root/config-db/t/21-group_system_ref.t
diff options
context:
space:
mode:
Diffstat (limited to 'config-db/t/21-group_system_ref.t')
-rw-r--r--config-db/t/21-group_system_ref.t154
1 files changed, 77 insertions, 77 deletions
diff --git a/config-db/t/21-group_system_ref.t b/config-db/t/21-group_system_ref.t
index 6f92a8dd..b643f7e0 100644
--- a/config-db/t/21-group_system_ref.t
+++ b/config-db/t/21-group_system_ref.t
@@ -24,172 +24,172 @@ my $system1 = shift @systems;
my $system3 = shift @systems;
foreach my $group ($group1, $group3) {
- is(
- my @systemIDs = $configDB->fetchSystemIDsOfGroup($group->{id}),
- 0, "group $group->{id} has no system-IDs yet"
- );
+ is(
+ my @systemIDs = $configDB->fetchSystemIDsOfGroup($group->{id}),
+ 0, "group $group->{id} has no system-IDs yet"
+ );
}
foreach my $system ($defaultSystem, $system1, $system3) {
- is(
- my @groupIDs = $configDB->fetchGroupIDsOfSystem($system->{id}),
- 0, "system $system->{id} has no group-IDs yet"
- );
+ is(
+ my @groupIDs = $configDB->fetchGroupIDsOfSystem($system->{id}),
+ 0, "system $system->{id} has no group-IDs yet"
+ );
}
ok(
- $configDB->addSystemIDsToGroup(1, [3]),
- 'system-ID 3 has been associated to group 1'
+ $configDB->addSystemIDsToGroup(1, [3]),
+ 'system-ID 3 has been associated to group 1'
);
is(
- my @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
- 1, "group 1 should have one system-ID"
+ my @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
+ 1, "group 1 should have one system-ID"
);
is($systemIDs[0], 3, "first system of group 1 should have ID 3");
is(
- @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
- 0, "group 3 should have no system-ID"
+ @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
+ 0, "group 3 should have no system-ID"
);
is(
- my @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)),
- 0, "default system should have no group-IDs"
+ my @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)),
+ 0, "default system should have no group-IDs"
);
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
- 0, "system 1 should have no group-IDs"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
+ 0, "system 1 should have no group-IDs"
);
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)),
- 1, "system 3 should have one group-ID"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)),
+ 1, "system 3 should have one group-ID"
);
is($groupIDs[0], 1, "first group of system 3 should have ID 1");
ok(
- $configDB->addSystemIDsToGroup(3, [1,3,3,1,3]),
- 'system-IDs 1 and 3 have been associated to group 3'
+ $configDB->addSystemIDsToGroup(3, [1,3,3,1,3]),
+ 'system-IDs 1 and 3 have been associated to group 3'
);
is(
- @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
- 1, "group 1 should have one system-ID"
+ @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
+ 1, "group 1 should have one system-ID"
);
is($systemIDs[0], 3, "first system of group 1 should have ID 3");
is(
- @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
- 2, "group 3 should have two system-IDs"
+ @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
+ 2, "group 3 should have two system-IDs"
);
is($systemIDs[0], 1, "first system of group 3 should have ID 1");
is($systemIDs[1], 3, "second system of group 3 should have ID 3");
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)),
- 0, "default system should have no group-ID"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)),
+ 0, "default system should have no group-ID"
);
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
- 1, "system 1 should have one group-ID"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
+ 1, "system 1 should have one group-ID"
);
is($groupIDs[0], 3, "first group of system 1 should have ID 3");
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)),
- 2, "system 3 should have two group-IDs"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)),
+ 2, "system 3 should have two group-IDs"
);
is($groupIDs[0], 1, "first group of system 3 should have ID 1");
is($groupIDs[1], 3, "second group of system 3 should have ID 3");
ok(
- $configDB->setGroupIDsOfSystem(3, []),
- 'group-IDs of system 3 have been set to empty array'
+ $configDB->setGroupIDsOfSystem(3, []),
+ 'group-IDs of system 3 have been set to empty array'
);
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)),
- 0, "system 3 should have no group-IDs"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)),
+ 0, "system 3 should have no group-IDs"
);
is(
- @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
- 0, "group 1 should have no more system-IDs"
+ @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
+ 0, "group 1 should have no more system-IDs"
);
is(
- @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
- 1, "group 3 should have one system-ID"
+ @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
+ 1, "group 3 should have one system-ID"
);
is($systemIDs[0], 1, "first system of group 3 should have ID 1");
ok(
- $configDB->addSystemIDsToGroup(1, [0]),
- 'associating the default system should have no effect'
+ $configDB->addSystemIDsToGroup(1, [0]),
+ 'associating the default system should have no effect'
);
is(
- @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
- 0, "group 1 should still have no system-ID"
+ @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
+ 0, "group 1 should still have no system-ID"
);
ok(
- $configDB->removeGroupIDsFromSystem(1, [1]),
- 'removing an unassociated group-ID should have no effect'
+ $configDB->removeGroupIDsFromSystem(1, [1]),
+ 'removing an unassociated group-ID should have no effect'
);
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
- 1, "system 1 should have one group-ID"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
+ 1, "system 1 should have one group-ID"
);
ok(
- $configDB->removeGroupIDsFromSystem(1, [3]),
- 'removing an associated group-ID should work'
+ $configDB->removeGroupIDsFromSystem(1, [3]),
+ 'removing an associated group-ID should work'
);
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
- 0, "system 1 should have no more group-ID"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
+ 0, "system 1 should have no more group-ID"
);
$configDB->addSystem({
- 'name' => 'sys-5',
- 'export_id' => 1,
- 'comment' => 'shortlived',
+ 'name' => 'sys-5',
+ 'export_id' => 1,
+ 'comment' => 'shortlived',
});
ok(
- $configDB->addGroupIDsToSystem(5, [3]),
- 'default group has been associated to system 5'
+ $configDB->addGroupIDsToSystem(5, [3]),
+ 'default group has been associated to system 5'
);
is(
- @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
- 0, "group 1 should have no system-ID"
+ @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)),
+ 0, "group 1 should have no system-ID"
);
is(
- @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
- 1, "group 3 should have no system-ID"
+ @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
+ 1, "group 3 should have no system-ID"
);
is($systemIDs[0], 5, "first system of group 3 should have ID 5");
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)),
- 0, "default system should have no group-IDs"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)),
+ 0, "default system should have no group-IDs"
);
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
- 0, "system 1 should have no group-ID"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)),
+ 0, "system 1 should have no group-ID"
);
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)),
- 0, "system 3 should have no group-IDs"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)),
+ 0, "system 3 should have no group-IDs"
);
is(
- @groupIDs = sort($configDB->fetchGroupIDsOfSystem(5)),
- 1, "system 5 should have one group-ID"
+ @groupIDs = sort($configDB->fetchGroupIDsOfSystem(5)),
+ 1, "system 5 should have one group-ID"
);
is($groupIDs[0], 3, "first group of system 5 should have ID 3");
ok(
- $configDB->removeSystemIDsFromGroup(3, [6]),
- 'removing an unassociated system-ID should have no effect'
+ $configDB->removeSystemIDsFromGroup(3, [6]),
+ 'removing an unassociated system-ID should have no effect'
);
is(
- @groupIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
- 1, "group 3 should have one system-ID"
+ @groupIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
+ 1, "group 3 should have one system-ID"
);
ok(
- $configDB->removeSystem(5),
- 'removing a system should drop group associations, too'
+ $configDB->removeSystem(5),
+ 'removing a system should drop group associations, too'
);
is(
- @groupIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
- 0, "group 3 should have no more system-ID"
+ @groupIDs = sort($configDB->fetchSystemIDsOfGroup(3)),
+ 0, "group 3 should have no more system-ID"
);
$configDB->disconnect();