Skip to content

Commit 37e9f4c

Browse files
committed
Fix specs after adding phone number validation
1 parent fc37e0f commit 37e9f4c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spec/controllers/people_controller_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616

1717
describe 'POST create' do
1818
it 'Creates a record' do
19-
expect{ post :create, params: { person: { name: 'foo', phone_number: '123', email: 'foo' } } }.to change{ Person.count }.by(1)
19+
expect{ post :create, params: { person: { name: 'foo', phone_number: '1234567890', email: 'foo' } } }.to change{ Person.count }.by(1)
2020
end
2121

2222
it 'has status found' do
23-
expect(post :create, params: { person: { name: 'foo', phone_number: '123', email: 'foo' } }).to have_http_status(:found)
23+
expect(post :create, params: { person: { name: 'foo', phone_number: '(123) 456-7650', email: 'foo' } }).to have_http_status(:found)
2424
end
2525
end
2626
end

spec/features/people/index_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
before do
55
Person.create(
66
name: 'Foo Bar',
7-
phone_number: 'Biz',
7+
phone_number: '(123) 456 7890',
88
email: 'Baz'
99
)
1010
end

0 commit comments

Comments
 (0)