Sha256: 73063e9a526990b30be90900eccb8c14465b69f1001a7fe67468692a85a87163

Contents?: true

Size: 742 Bytes

Versions: 25

Compression:

Stored size: 742 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
      object.to_s.should == 'ABC, Inc.'
    end
  end

  describe '#fingerprint' do
    it 'should return the fingerprint' do
      object.fingerprint.should == {
        '$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

25 entries across 25 versions & 1 rubygems

Version Path
pupa-0.1.11 spec/models/organization_spec.rb
pupa-0.1.10 spec/models/organization_spec.rb
pupa-0.1.9 spec/models/organization_spec.rb
pupa-0.1.8 spec/models/organization_spec.rb
pupa-0.1.7 spec/models/organization_spec.rb
pupa-0.1.6 spec/models/organization_spec.rb
pupa-0.1.5 spec/models/organization_spec.rb
pupa-0.1.4 spec/models/organization_spec.rb
pupa-0.1.3 spec/models/organization_spec.rb
pupa-0.1.2 spec/models/organization_spec.rb
pupa-0.1.1 spec/models/organization_spec.rb
pupa-0.1.0 spec/models/organization_spec.rb
pupa-0.0.13 spec/models/organization_spec.rb
pupa-0.0.12 spec/models/organization_spec.rb
pupa-0.0.11 spec/models/organization_spec.rb
pupa-0.0.10 spec/models/organization_spec.rb
pupa-0.0.9 spec/models/organization_spec.rb
pupa-0.0.8 spec/models/organization_spec.rb
pupa-0.0.7 spec/models/organization_spec.rb
pupa-0.0.6 spec/models/organization_spec.rb