Sha256: be6450c1488faeafb4ed02ac298e7c706d6e823dfd9462ec90a7a1c0a63971cc
Contents?: true
Size: 866 Bytes
Versions: 18
Compression:
Stored size: 866 Bytes
Contents
require_relative '../../../../lib/sendgrid/helpers/mail/email' require 'minitest/autorun' class TestEmail < Minitest::Test include SendGrid def test_split_email_full_email @email = Email.new(email: "Example User <test1@example.com>") expected_json = { "email"=>"test1@example.com", "name"=>"Example User" } assert_equal @email.to_json, expected_json end def test_split_email_only_email @email = Email.new(email: "test1@example.com") expected_json = { "email"=>"test1@example.com", } assert_equal @email.to_json, expected_json end def test_split_email_name_and_email @email = Email.new(name: "Example User", email: "test1@example.com") expected_json = { "email"=>"test1@example.com", "name"=>"Example User" } assert_equal @email.to_json, expected_json end end
Version data entries
18 entries across 18 versions & 1 rubygems