Sha256: 14c76a61a2cb520f21cde911ae52df92b265b62efc97ac060f2b87711aaf6464

Contents?: true

Size: 633 Bytes

Versions: 33

Compression:

Stored size: 633 Bytes

Contents

require 'spec_helper'
require 'flydata-core/postgresql/query_helper'

module FlydataCore
module Postgresql

describe QueryHelper do
  describe '.schema_as_value' do
    subject { described_class.schema_as_value(schema) }

    context 'when schema is empty' do
      let(:schema) { '' }
      it { is_expected.to eq('(select current_schema)') }
    end

    context 'when schema is nil' do
      let(:schema) { nil }
      it { is_expected.to eq('(select current_schema)') }
    end

    context 'when schema is a text' do
      let(:schema) { 'test-schema'}
      it { is_expected.to eq("'test-schema'") }
    end
  end
end

end
end

Version data entries

33 entries across 33 versions & 1 rubygems

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