diff options
author | Oliver Tappe | 2008-03-17 21:52:32 +0100 |
---|---|---|
committer | Oliver Tappe | 2008-03-17 21:52:32 +0100 |
commit | d5b519a07cb697536e735a13249c0a90bbb81999 (patch) | |
tree | 7cccc44e42bc5fe8db016c271fabcb022ffaaf90 /config-db | |
parent | * instead of using a fixed basic path, we now supply a longer list in an (diff) | |
download | core-d5b519a07cb697536e735a13249c0a90bbb81999.tar.gz core-d5b519a07cb697536e735a13249c0a90bbb81999.tar.xz core-d5b519a07cb697536e735a13249c0a90bbb81999.zip |
* adjusted to recent changes in plugin-code
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1644 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'config-db')
-rw-r--r-- | config-db/t/10-vendor-os.t | 18 |
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' |