Sha256: 5b11c658d9646987efaaf9011bb4bfdf7877b24a19a226faa66ee7a546d36221
Contents?: true
Size: 827 Bytes
Versions: 11
Compression:
Stored size: 827 Bytes
Contents
require "spec_helper" describe "Simple::SQL::Config" do describe ".determine_url" do it "reads config/database.yml" do expect(SQL::Config.determine_url).to eq "postgres://postgres@127.0.0.1/simple-sql-test" end end describe ".parse_url" do it "parses a DATABASE_URL" do parsed = SQL::Config.parse_url "postgres://foo:bar@server/database" expect(parsed).to eq( dbname: "database", host: "server", password: "bar", sslmode: "prefer", user: "foo") end it "may enforce SSL" do parsed = SQL::Config.parse_url "postgress://foo:bar@server/database" expect(parsed).to eq( dbname: "database", host: "server", password: "bar", sslmode: "require", user: "foo") end end end
Version data entries
11 entries across 11 versions & 1 rubygems