Sha256: a2f448547db1565ea40a3fa9ff5712643aca8eb6cf9065736f10b01a38335d0b

Contents?: true

Size: 1.17 KB

Versions: 21

Compression:

Stored size: 1.17 KB

Contents

require 'spec_helper'
require 'flydata-core/oracle/config'

module FlydataCore
  module Oracle
    describe Config do
      describe '.build_oci_uri' do
        subject { described_class.build_oci_uri(conf) }

        context 'with uri conf' do
          let(:expected_uri) { "admin/welcome@localhost:1521/ORCL" }
          let(:conf) {
            {
              uri: expected_uri,
              host: 'localhost',
              port: 1234,
              username: 'testuser',
              password: 'password',
              database: 'testdb',
              user: 'testuser',
              dbname: 'testdb',
            }
          }
          it { is_expected.to eq(expected_uri) }
        end

        context 'with conf having dbname' do
          let(:expected_uri) { "testuser/password@localhost:1234/testdb" }
          let(:conf) {
            {
              host: 'localhost',
              port: 1234,
              username: 'testuser',
              password: 'password',
              database: 'testdb',
              user: 'testuser',
              dbname: 'testdb',
            }
          }
          it { is_expected.to eq(expected_uri) }
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
flydata-0.8.10.2 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.10.1 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.9.11 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.10 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.9 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.8 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.7 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.6 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.5 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.4 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.3 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.2 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.1 flydata-core/spec/oracle/config_spec.rb
flydata-0.8.0 flydata-core/spec/oracle/config_spec.rb
flydata-0.7.19 flydata-core/spec/oracle/config_spec.rb
flydata-0.7.18 flydata-core/spec/oracle/config_spec.rb
flydata-0.7.17 flydata-core/spec/oracle/config_spec.rb
flydata-0.7.16 flydata-core/spec/oracle/config_spec.rb
flydata-0.7.15 flydata-core/spec/oracle/config_spec.rb
flydata-0.7.14 flydata-core/spec/oracle/config_spec.rb