require 'rails_helper'

RSpec.describe "crm/customers/show", type: :view do
  before(:each) do
    @crm_customer = assign(:crm_customer, Crm::Customer.create!(
      :name => "Name",
      :company => "Company",
      :contact_no => "Contact No",
      :email => "Email",
      :membership => nil,
      :membership_type => "Membership Type",
      :membership_authentication_code => "Membership Authentication Code"
    ))
  end

  it "renders attributes in <p>" do
    render
    expect(rendered).to match(/Name/)
    expect(rendered).to match(/Company/)
    expect(rendered).to match(/Contact No/)
    expect(rendered).to match(/Email/)
    expect(rendered).to match(//)
    expect(rendered).to match(/Membership Type/)
    expect(rendered).to match(/Membership Authentication Code/)
  end
end
