chore: Auto capitalize the last name field while sending the canned response/variables (#6767)
* Capitalize last name * Add more spec * Fix last name spec issue * More spec fixes * Add more spec fixes * Update user_drop_spec.rb
This commit is contained in:
@@ -13,7 +13,12 @@ describe ::ContactDrop do
|
||||
|
||||
it('return the capitalized name') do
|
||||
contact.update!(name: 'john doe')
|
||||
expect(subject.name).to eq 'John doe'
|
||||
expect(subject.name).to eq 'John Doe'
|
||||
end
|
||||
|
||||
it('return the capitalized first name') do
|
||||
contact.update!(name: 'john doe')
|
||||
expect(subject.last_name).to eq 'Doe'
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,5 +32,10 @@ describe ::ContactDrop do
|
||||
contact.update!(name: 'John')
|
||||
expect(subject.last_name).to be_nil
|
||||
end
|
||||
|
||||
it('return the capitalized last name') do
|
||||
contact.update!(name: 'john doe')
|
||||
expect(subject.last_name).to eq 'Doe'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,6 +10,11 @@ describe ::UserDrop do
|
||||
user.update!(name: 'John Doe')
|
||||
expect(subject.first_name).to eq 'John'
|
||||
end
|
||||
|
||||
it('return the capitalized first name') do
|
||||
user.update!(name: 'john doe')
|
||||
expect(subject.first_name).to eq 'John'
|
||||
end
|
||||
end
|
||||
|
||||
it('return the capitalized name') do
|
||||
@@ -27,5 +32,10 @@ describe ::UserDrop do
|
||||
user.update!(name: 'John')
|
||||
expect(subject.last_name).to be_nil
|
||||
end
|
||||
|
||||
it('return the capitalized last name') do
|
||||
user.update!(name: 'john doe')
|
||||
expect(subject.last_name).to eq 'Doe'
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user