diff --git a/spec/models/member_spec.rb b/spec/models/member_spec.rb index 2295122b8..ada016d42 100644 --- a/spec/models/member_spec.rb +++ b/spec/models/member_spec.rb @@ -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