37 lines
1.2 KiB
Ruby
Executable File
37 lines
1.2 KiB
Ruby
Executable File
require 'rails_helper'
|
|
|
|
RSpec.describe "crm/customers/edit", type: :view do
|
|
before(:each) do
|
|
@crm_customer = assign(:crm_customer, Crm::Customer.create!(
|
|
:name => "MyString",
|
|
:company => "MyString",
|
|
:contact_no => "MyString",
|
|
:email => "MyString",
|
|
:membership => nil,
|
|
:membership_type => "MyString",
|
|
:membership_authentication_code => "MyString"
|
|
))
|
|
end
|
|
|
|
it "renders the edit crm_customer form" do
|
|
render
|
|
|
|
assert_select "form[action=?][method=?]", crm_customer_path(@crm_customer), "post" do
|
|
|
|
assert_select "input#crm_customer_name[name=?]", "crm_customer[name]"
|
|
|
|
assert_select "input#crm_customer_company[name=?]", "crm_customer[company]"
|
|
|
|
assert_select "input#crm_customer_contact_no[name=?]", "crm_customer[contact_no]"
|
|
|
|
assert_select "input#crm_customer_email[name=?]", "crm_customer[email]"
|
|
|
|
assert_select "input#crm_customer_membership_id[name=?]", "crm_customer[membership_id]"
|
|
|
|
assert_select "input#crm_customer_membership_type[name=?]", "crm_customer[membership_type]"
|
|
|
|
assert_select "input#crm_customer_membership_authentication_code[name=?]", "crm_customer[membership_authentication_code]"
|
|
end
|
|
end
|
|
end
|