about summary refs log tree commit
path: root/t
diff options
context:
space:
mode:
authorEric Wong <e@yhbt.net>2020-02-04 04:44:25 +0000
committerEric Wong <e@yhbt.net>2020-02-04 21:39:56 +0000
commit253a86b7bf4a3d81118e91f4ebb77844cfbd2b32 (patch)
treeda6b875b9d5f38be331b59adcdd37b5708a4c65a /t
parentfea03df0e2e95ad3ac44ac46d9c31da97fa2fde9 (diff)
downloadpublic-inbox-253a86b7bf4a3d81118e91f4ebb77844cfbd2b32.tar.gz
No need to call ref() and do a string comparison.  Add some
extra tests using the {ReadOnly} attribute in DBI.pm.
Diffstat (limited to 't')
-rw-r--r--t/over.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/t/over.t b/t/over.t
index 4e630bcd..daa7176f 100644
--- a/t/over.t
+++ b/t/over.t
@@ -18,10 +18,15 @@ is($y, $x+1, 'tid increases');
 $x = $over->sid('hello-world');
 is(int($x), $x, 'integer sid');
 $y = $over->sid('hello-WORLD');
-is($y, $x+1, 'sid ncreases');
+is($y, $x+1, 'sid increases');
 is($over->sid('hello-world'), $x, 'idempotent');
+ok(!$over->{dbh}->{ReadOnly}, 'OverIdx is not ReadOnly');
 $over->disconnect;
 
+$over = PublicInbox::Over->new("$tmpdir/over.sqlite3");
+$over->connect;
+ok($over->{dbh}->{ReadOnly}, 'Over is ReadOnly');
+
 $over = PublicInbox::OverIdx->new("$tmpdir/over.sqlite3");
 $over->connect;
 is($over->sid('hello-world'), $x, 'idempotent across reopen');