4 use RT::Test nodb => 1, tests => 9;
14 my $meta = RT::Config->Meta('foo');
15 is( $meta->{Section}, 'bar', 'Section is bar' );
16 is( $meta->{Widget}, '/Widgets/Form/String', 'default Widget is string' );
17 is_deeply( $meta->{WidgetArguments},
18 {},, 'default WidgetArguments is empty hashref' );
21 RT::Config->UpdateOption(
24 Widget => '/Widgets/Form/Boolean',
26 'updated option foo to section baz'
28 is( $meta->{Section}, 'baz', 'section is updated to baz' );
29 is( $meta->{Widget}, '/Widgets/Form/Boolean', 'widget is updated to boolean' );
31 ok( RT::Config->DeleteOption( Name => 'foo' ), 'removed option foo' );
32 is( RT::Config->Meta('foo'), undef, 'foo is indeed deleted' );