scaffold models
This commit is contained in:
26
spec/views/crm/customers/show.html.erb_spec.rb
Normal file
26
spec/views/crm/customers/show.html.erb_spec.rb
Normal file
@@ -0,0 +1,26 @@
|
||||
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
|
||||
Reference in New Issue
Block a user