scaffold models

This commit is contained in:
Min Zeya Phyo
2017-04-20 17:01:14 +06:30
parent 0a97947259
commit 0af7d78c3c
145 changed files with 4127 additions and 2 deletions

View File

@@ -0,0 +1,36 @@
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