summaryrefslogtreecommitdiffstats
path: root/test/t/salsa-config.t
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--test/t/salsa-config.t18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/t/salsa-config.t b/test/t/salsa-config.t
new file mode 100644
index 0000000..1ee644a
--- /dev/null
+++ b/test/t/salsa-config.t
@@ -0,0 +1,18 @@
+use Test::More tests => 8;
+
+BEGIN {
+ use_ok('Devscripts::Salsa::Config');
+}
+
+@Devscripts::Config::config_files = ('t/config1');
+@ARGV = ('push_repo', '--disable-kgb', '--tagpending', '--irker');
+
+ok($conf = Devscripts::Salsa::Config->new->parse, 'Parse');
+
+ok(($conf->kgb == 0 and $conf->disable_kgb), 'KGB disabled');
+ok(($conf->tagpending and $conf->disable_tagpending == 0),
+ 'Tagpending enabled');
+ok(($conf->issues == 'disabled'), 'Enable-issues disabled');
+ok(($conf->email == 0 and $conf->disable_email == 0), 'Email ignored');
+ok(($conf->mr == 'enabled'), 'MR enabled');
+ok(($conf->irker == 1 and $conf->disable_irker == 0), 'Irker enabled');