Sha256: f756fce07168c4a8aa4992fea51b10294589850553324189c192d98d6cc08d21

Contents?: true

Size: 507 Bytes

Versions: 18

Compression:

Stored size: 507 Bytes

Contents

require 'spec_helper'

describe ActiveForce::Mapping do
  let(:mapping){ ActiveForce::Mapping.new 'some_table' }

  describe 'field' do
    it 'should add a new attribute to the instance' do
      mapping.field :id, from: 'Id'
      expect(mapping.mappings).to eq({ id: 'Id' })
    end

    it 'sf_names should return all attributes names from salesforce' do
      mapping.field :id, from: 'Id'
      mapping.field :name, from: 'Name'
      expect(mapping.sfdc_names).to eq ['Id', 'Name']
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

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