Sha256: 1f369a7465fd211acfbf049af2b489083ddb3aaab31e437c66c1c8f059f28901

Contents?: true

Size: 482 Bytes

Versions: 3

Compression:

Stored size: 482 Bytes

Contents

require 'spec_helper'

describe Nullalign::Introspectors::TableData do
  
  describe "finding nonnull constraints" do
    it "finds none when the table does not exist" do
      expect(subject.nonnull_constraints(Nonexistent)).to be_empty
    end

    it "gets one" do
      expect(
        Nullalign::Introspectors::TableData.new.nonnull_constraints_by_table(
          CorrectAccount,
          CorrectAccount.table_name
        )[1].column
      ).to eq "email"
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nullalign-0.0.4 spec/introspectors/table_data_spec.rb
nullalign-0.0.3 spec/introspectors/table_data_spec.rb
nullalign-0.0.2 spec/introspectors/table_data_spec.rb