Sha256: 198898e8f11f8381e73ec86629fb5972341b164d7a3f512306b49d8ee3d885ff

Contents?: true

Size: 1.45 KB

Versions: 6

Compression:

Stored size: 1.45 KB

Contents

require File.join(File.dirname(__FILE__),'..','spec_helper')

describe "Contact" do
  it_should_behave_like "SpecHelper" do
    before(:each) do
      sample_data_file = File.join(File.dirname(__FILE__),'..','..','vendor','salesforce','spec_data','Contact.yml')
      @sample_data = YAML.load_file(sample_data_file)['Contact'] if sample_data_file and File.exist?(sample_data_file)
      setup_test_for Contact,@test_user
      Application.authenticate(@test_user, @test_password,"")
    end

    before(:each) do
      @ss.adapter.login
    end
  
    after(:each) do
      @ss.adapter.logoff
    end

    it "should process Contact query" do
      result = test_query
      puts result.length.inspect
      query_errors.should == {}
    end
  
    it "should process Contact create" do
      create_hash = @sample_data
      result = test_create(create_hash)
      puts result.inspect
      create_hash['Id'] = result
      TestHelpers.created_records = { result => create_hash }
      create_errors.should == {}
    end
  
    it "should process Contact update" do
      TestHelpers.created_records.each do |key,value|
        value["FirstName"] = "Changed Name #{key.to_s}"
      end
      result = test_update(TestHelpers.created_records)
      puts result.inspect
      update_errors.should == {}
    end
  
    it "should process Contact delete" do
      result = test_delete(TestHelpers.created_records)
      puts result.inspect
      delete_errors.should == {}
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rhoconnect-adapters-1.0.2 generators/crm/vendor/salesforce/spec/sources/contact_spec.rb
rhoconnect-adapters-1.0.1 generators/crm/vendor/salesforce/spec/sources/contact_spec.rb
rhoconnect-adapters-1.0.0 generators/crm/vendor/salesforce/spec/sources/contact_spec.rb
rhoconnect-adapters-1.0.0.beta3 generators/crm/vendor/salesforce/spec/sources/contact_spec.rb
rhoconnect-adapters-1.0.0.beta2 generators/crm/vendor/salesforce/spec/sources/contact_spec.rb
rhoconnect-adapters-1.0.0.beta1 generators/crm/vendor/salesforce/spec/sources/contact_spec.rb