summaryrefslogtreecommitdiffstats
path: root/config-db/t/10-vendor-os.t
diff options
context:
space:
mode:
Diffstat (limited to 'config-db/t/10-vendor-os.t')
-rw-r--r--config-db/t/10-vendor-os.t18
1 files changed, 9 insertions, 9 deletions
diff --git a/config-db/t/10-vendor-os.t b/config-db/t/10-vendor-os.t
index f2d11302..ac16becf 100644
--- a/config-db/t/10-vendor-os.t
+++ b/config-db/t/10-vendor-os.t
@@ -192,25 +192,25 @@ ok(! $configDB->changeVendorOS(1, { id => 23 }), 'changing id should fail');
# test adding & removing of installed plugins
is(
- $configDB->fetchInstalledPlugins(3),
+ my @plugins = $configDB->fetchInstalledPlugins(3),
0, 'there should be no installed plugins'
);
ok($configDB->addInstalledPlugin(3, 'Example'), 'adding installed plugin');
is(
- my @plugins = $configDB->fetchInstalledPlugins(3),
+ @plugins = $configDB->fetchInstalledPlugins(3),
1,
'should have 1 installed plugin'
);
-ok(
- !$configDB->addInstalledPlugin(3, 'Example'),
- 'adding plugin again should fail (but do not harm)'
+is(
+ $configDB->addInstalledPlugin(3, 'Example'), 1,
+ 'adding plugin again should work (but do not harm, just update the attrs)'
);
is(
@plugins = $configDB->fetchInstalledPlugins(3),
1,
- 'should have 1 installed plugin'
+ 'should still have 1 installed plugin'
);
-is($plugins[0], 'Example', 'should have got plugin "Example"');
+is($plugins[0]->{plugin_name}, 'Example', 'should have got plugin "Example"');
ok($configDB->addInstalledPlugin(3, 'Test'), 'adding a second plugin');
is(
@plugins = $configDB->fetchInstalledPlugins(3),
@@ -225,12 +225,12 @@ ok(
@plugins = $configDB->fetchInstalledPlugins(3, 'Example'),
'fetching specific plugin'
);
-is($plugins[0], 'Example', 'should have got plugin "Example"');
+is($plugins[0]->{plugin_name}, 'Example', 'should have got plugin "Example"');
ok(
@plugins = $configDB->fetchInstalledPlugins(3, 'Test'),
'fetching another specific plugin'
);
-is($plugins[0], 'Test', 'should have got plugin "Test"');
+is($plugins[0]->{plugin_name}, 'Test', 'should have got plugin "Test"');
is(
@plugins = $configDB->fetchInstalledPlugins(3, 'xxx'), 0,
'fetching unknown specific plugin'