Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
Add DB round trip to member specs.
Browse files Browse the repository at this point in the history
  • Loading branch information
EricBoersma committed Jan 13, 2016
1 parent a46ea28 commit 4220848
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions spec/models/member_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,24 +21,30 @@
it 'correctly splits full_name into first and last name' do
member = Member.new
member.name = full_name
expect(member.first_name).to eq(first_name)
expect(member.last_name).to eq(last_name)
expect(member.name).to eq(full_name)
member.save
new_member = Member.find(member.id)
expect(new_member.first_name).to eq(first_name)
expect(new_member.last_name).to eq(last_name)
expect(new_member.name).to eq(full_name)
end

it 'correctly handles unicode characters' do
member = Member.new
member.name = unicode_full
expect(member.first_name).to eq(unicode_first)
expect(member.last_name).to eq(unicode_last)
expect(member.name).to eq(unicode_full)
member.save
new_member = Member.find(member.id)
expect(new_member.first_name).to eq(unicode_first)
expect(new_member.last_name).to eq(unicode_last)
expect(new_member.name).to eq(unicode_full)
end

it 'correctly handles high-value unicode characters' do
member = Member.new
member.name = chinese_full
expect(member.first_name).to eq(chinese_first)
expect(member.last_name).to eq(chinese_last)
expect(member.name).to eq(chinese_full)
member.save
new_member = Member.find(member.id)
expect(new_member.first_name).to eq(chinese_first)
expect(new_member.last_name).to eq(chinese_last)
expect(new_member.name).to eq(chinese_full)
end
end

0 comments on commit 4220848

Please sign in to comment.