From aab83aaf09cac051810366fae720426486e727d0 Mon Sep 17 00:00:00 2001 From: Lars Kanis Date: Thu, 7 Jul 2011 15:07:05 +0200 Subject: [PATCH] check results of psql-du --- test/test_pg_ldap_sync.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test_pg_ldap_sync.rb b/test/test_pg_ldap_sync.rb index 59e0400..f90ef5a 100644 --- a/test/test_pg_ldap_sync.rb +++ b/test/test_pg_ldap_sync.rb @@ -67,6 +67,13 @@ class TestPgLdapSync < Test::Unit::TestCase PgLdapSync::Application.run(%w[-c test/fixtures/config-ldapdb.yaml -vv]) ENV['LC_MESSAGES'] = 'C' - log_and_run 'psql', '-c', "\\du", 'postgres' + psql_du = `psql -c \\\\du postgres` + puts psql_du + + assert_match(/All Users.*Cannot login.*{}/, psql_du) + assert_match(/Flintstones.*Cannot login.*{}/, psql_du) + assert_match(/Wilmas.*Cannot login.*All Users/, psql_du) + assert_match(/fred.*All Users.*Flintstones/, psql_du) + assert_match(/wilma.*Flintstones.*Wilmas/, psql_du) end end