aboutsummaryrefslogtreecommitdiffstats
path: root/spec/dbshell/client/postgres_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/dbshell/client/postgres_spec.rb')
-rw-r--r--spec/dbshell/client/postgres_spec.rb26
1 files changed, 26 insertions, 0 deletions
diff --git a/spec/dbshell/client/postgres_spec.rb b/spec/dbshell/client/postgres_spec.rb
new file mode 100644
index 0000000..2f767f1
--- /dev/null
+++ b/spec/dbshell/client/postgres_spec.rb
@@ -0,0 +1,26 @@
+require 'minitest/autorun'
+require 'dbshell/postgres_client'
+
+describe DBShell::PostgresClient do
+ describe ".build_command" do
+ it "builds basic arguments" do
+ DBShell::PostgresClient.build_command({
+ 'adapter' => 'postgresql',
+ 'host' => 'mailmarehost',
+ 'port' => 6027,
+ 'username' => 'derpyhooves',
+ 'password' => 'somepassword',
+ 'database' => 'dbname'
+ }).must_equal([
+ 'psql',
+ '-U',
+ 'derpyhooves',
+ '-h',
+ 'mailmarehost',
+ '-p',
+ 6027,
+ 'dbname'
+ ])
+ end
+ end
+end