Sha256: 982cf45e7e45ab29f7a77af7ecac3e81b9302c1f32a2270359af265ed2688939

Contents?: true

Size: 752 Bytes

Versions: 5

Compression:

Stored size: 752 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Pupa::Organization do
  let :object do
    Pupa::Organization.new(name: 'ABC, Inc.', classification: 'Corporation', parent_id: 'holding-company-corp')
  end

  describe '#to_s' do
    it 'should return a human-readable string' do
      expect(object.to_s).to eq('ABC, Inc.')
    end
  end

  describe '#fingerprint' do
    it 'should return the fingerprint' do
      expect(object.fingerprint).to eq({
        '$or' => [
          {'name' => 'ABC, Inc.', classification: 'Corporation', parent_id: 'holding-company-corp'},
          {'other_names.name' => 'ABC, Inc.', classification: 'Corporation', parent_id: 'holding-company-corp'},
        ],
      })
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pupa-0.2.4 spec/models/organization_spec.rb
pupa-0.2.3 spec/models/organization_spec.rb
pupa-0.2.2 spec/models/organization_spec.rb
pupa-0.2.1 spec/models/organization_spec.rb
pupa-0.2.0 spec/models/organization_spec.rb