[siesta-commit] siesta/t 08config.t,1.6,1.7

[prev] [thread] [next] [lurker] [Date index for 2002/09/08]

From: muttley
Subject: [siesta-commit] siesta/t 08config.t,1.6,1.7
Date: 13:04 on 08 Sep 2002
Update of /cvsroot/siesta/siesta/t
In directory usw-pr-cvs1:/tmp/cvs-serv4871/t

Modified Files:
	08config.t 
Log Message:
Checking even more.


Index: 08config.t
===================================================================
RCS file: /cvsroot/siesta/siesta/t/08config.t,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- 08config.t	8 Sep 2002 11:12:14 -0000	1.6
+++ 08config.t	8 Sep 2002 12:04:43 -0000	1.7
@@ -18,7 +18,7 @@
 ok(Siesta->storage->config('ReplyTo', undef, undef, 'munge', 0));
 
 # check
-$value = Siesta->storage->config('ReplyTo', undef, undef, 'munge');
+$value = Siesta->storage->get_config_explicitly('ReplyTo', undef, undef, 'munge');
 is($value, 0, "insert default");
 
 #############
@@ -29,7 +29,7 @@
 ok(Siesta->storage->config('ReplyTo', undef, 'siesta-dev', 'munge', 1));
 
 # check
-$value = Siesta->storage->config('ReplyTo', undef, 'siesta-dev', 'munge');
+$value = Siesta->storage->get_config_explicitly('ReplyTo', undef, 'siesta-dev', 'munge');
 is($value, 1, "insert per list");
 
 
@@ -41,7 +41,7 @@
 ok(Siesta->storage->config('ReplyTo', 'simon@xxxxxxxxxx.xxx', undef, 'munge', 0));
 
 # check
-$value = Siesta->storage->config('ReplyTo', 'simon@xxxxxxxxxx.xxx', undef, 'munge');
+$value = Siesta->storage->get_config_explicitly('ReplyTo', 'simon@xxxxxxxxxx.xxx', undef, 'munge');
 is($value, 0, "insert per user");
 
 
@@ -54,7 +54,7 @@
 
 
 # check
-$value = Siesta->storage->config('ReplyTo', 'simon@xxxxxxxxxx.xxx', 'siesta-dev', 'munge');
+$value = Siesta->storage->get_config_explicitly('ReplyTo', 'simon@xxxxxxxxxx.xxx', 'siesta-dev', 'munge');
 is($value, 1, "insert per user, per list");
 
 
@@ -87,23 +87,48 @@
 #############
 
 # default
-$value = Siesta->storage->config('ReplyTo', undef, undef, 'munge');
+$value = Siesta->storage->get_config_explicitly('ReplyTo', undef, undef, 'munge');
 is($value, 0, "check default");
 
 # per list
-$value = Siesta->storage->config('ReplyTo', undef, 'siesta-dev', 'munge');
+$value = Siesta->storage->get_config_explicitly('ReplyTo', undef, 'siesta-dev', 'munge');
 is($value, 1, "check per list");
 
 # per user
-$value = Siesta->storage->config('ReplyTo', 'simon@xxxxxxxxxx.xxx', undef, 'munge');
+$value = Siesta->storage->get_config_explicitly('ReplyTo', 'simon@xxxxxxxxxx.xxx', undef, 'munge');
 is($value, 0, "check per user");
 
 
 # per-user, per-list
-$value = Siesta->storage->config('ReplyTo', 'simon@xxxxxxxxxx.xxx', 'siesta-dev', 'munge');
+$value = Siesta->storage->get_config_explicitly('ReplyTo', 'simon@xxxxxxxxxx.xxx', 'siesta-dev', 'munge');
 is($value, 1, "check per user, per list");
 
 
+##############
+# fall through
+##############
+
+# check to see that a config check will fall through 
+# like this ...
+#
+#         per user, per list
+#                 |
+#              per user
+#                 |
+#              per list
+#                 |
+#           system default
+
+
+ok(Siesta->storage->config('ReplyTo', undef, undef, 'test', 'fallthrough'));
+
+
+is(Siesta->storage->config('ReplyTo', undef, undef, 'test'), 'fallthrough');
+is(Siesta->storage->config('ReplyTo', 'simon@xxxxxxxxxx.xxx', 'siesta-dev',  'test'), 'fallthrough');
+is(Siesta->storage->config('ReplyTo', 'simon@xxxxxxxxxx.xxx', undef, 'test'), 'fallthrough');
+is(Siesta->storage->config('ReplyTo', undef, 'siesta-dev', 'test'), 'fallthrough');
+
+
 ####################
 # as a plugin method
 ####################
@@ -126,19 +151,23 @@
    $listuser->mock( user => sub { $user } );
 
 # default
+$plugin->config($default, 'munge', 0);
 $value = $plugin->config($default, 'munge');
 is($value, 0, "plugin check default");
 
 # per list
+$plugin->config($perlist, 'munge', 1);
 $value = $plugin->config($perlist, 'munge');
 is($value, 1, "plugin check per list");
 
 # per user
+$plugin->config($peruser, 'munge', 0);
 $value = $plugin->config($peruser, 'munge');
 is($value, 0, "plugin check per user");
 
 
 # per-user, per-list
+$plugin->config($listuser, 'munge', 1);
 $value = $plugin->config($listuser, 'munge');
 is($value, 1, "plugin check per user, per list");
 
@@ -188,27 +217,4 @@
 
 
 
-##############
-# fall through
-##############
-
-# check to see that a config check will fall through 
-# like this ...
-#
-#         per user, per list
-#                 |
-#              per user
-#                 |
-#              per list
-#                 |
-#           system default
-
-
-ok($plugin->config($default, 'test', 'fallthrough'));
-
-
-is($plugin->config($listuser, 'test'), 'fallthrough');
-is($plugin->config($peruser, 'test'), 'fallthrough');
-is($plugin->config($perlist, 'test'), 'fallthrough');
-is($plugin->config($default, 'test'), 'fallthrough');
 



Generated at 13:57 on 01 Jul 2004 by mariachi 0.52