Sha256: 61df9df129fcc81278ef0a90d10313e43df6f7305351f38e32f3953805000fe0

Contents?: true

Size: 990 Bytes

Versions: 8

Compression:

Stored size: 990 Bytes

Contents

RSpec.describe "Creating record" do
  let(:first_name) { Faker::Name.first_name }
  let(:last_name) { Faker::Name.last_name }
  let(:salutation) { Contact::Salutation.sample }
  let(:other_street) { Faker::Address.full_address }
  it "populate form and save" do
    account = FactoryBot.create(:account)
    CreateContactPage.visit.submit_with({ "First Name" => first_name,
                                          last_name: last_name,
                                          salutation: salutation,
                                          other_street: other_street,
                                          account_id: account.account_name })
    contact_id = ViewContactPage.id
    @contact = Contact.find(id: contact_id)
    expect(@contact.first_name).to eq first_name
    expect(@contact.last_name).to eq last_name
    expect(@contact.salutation).to eq salutation
    expect(@contact.other_street).to eq other_street
    expect(@contact.account_id).to eq account.id
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
leap_salesforce_ui-0.3.0 lib/leap_salesforce_ui/generator/templates/ui_spec.rb.erb
leap_salesforce_ui-0.2.0 lib/leap_salesforce_ui/generator/templates/ui_spec.rb.erb
leap_salesforce_ui-0.1.9 lib/leap_salesforce_ui/generator/templates/ui_spec.rb.erb
leap_salesforce_ui-0.1.8 lib/leap_salesforce_ui/generator/templates/ui_spec.rb.erb
leap_salesforce_ui-0.1.7 lib/leap_salesforce_ui/generator/templates/ui_spec.rb.erb
leap_salesforce_ui-0.1.6 lib/leap_salesforce_ui/generator/templates/ui_spec.rb.erb
leap_salesforce_ui-0.1.5 lib/leap_salesforce_ui/generator/templates/ui_spec.rb.erb
leap_salesforce_ui-0.1.4 lib/leap_salesforce_ui/generator/templates/ui_spec.rb.erb