Sha256: 84cfd92afff5e140f9e4d9ae8b955ed49796e863b8ae884b34a069f19b8e1770

Contents?: true

Size: 657 Bytes

Versions: 18

Compression:

Stored size: 657 Bytes

Contents

require 'spec_helper'

describe ActiveForce::Table do
  describe '#table_name' do
    let(:table) { ActiveForce::Table }

    it 'Use the class name adding "__c"' do
      expect(table.new('Custom').name).to eq('Custom__c')
    end

    it 'with standard SObject types it does not add the "__c"' do
      expect(table.new('Account').name).to eq('Account')
    end

    context 'with a namespace' do
      it "the namespace is not included" do
        expect(table.new('Foo::Bar').name).to eq('Bar__c')
      end

      it 'standard types are inferred correctly' do
        expect(table.new('Foo::Account').name).to eq('Account')
      end
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
openstax_active_force-1.1.1 spec/active_force/table_spec.rb
active_force-0.24.0 spec/active_force/table_spec.rb
active_force-0.23.0 spec/active_force/table_spec.rb
active_force-0.22.1 spec/active_force/table_spec.rb
active_force-0.22.0 spec/active_force/table_spec.rb
active_force-0.21.0 spec/active_force/table_spec.rb
active_force-0.20.1 spec/active_force/table_spec.rb
active_force-0.20.0 spec/active_force/table_spec.rb
active_force-0.19.0 spec/active_force/table_spec.rb
active_force-0.18.0 spec/active_force/table_spec.rb
active_force-0.17.0 spec/active_force/table_spec.rb
active_force-0.16.0 spec/active_force/table_spec.rb
active_force-0.15.1 spec/active_force/table_spec.rb
active_force-0.15.0 spec/active_force/table_spec.rb
openstax_active_force-1.1.0 spec/active_force/table_spec.rb
openstax_active_force-1.0.0 spec/active_force/table_spec.rb
active_force-0.7.1 spec/active_force/table_spec.rb
active_force-0.7.0 spec/active_force/table_spec.rb