Sha256: f655b4d80e00956b337e6fd889100c1d554b7c64901cdede0092d1f337799cfa
Contents?: true
Size: 1.05 KB
Versions: 1
Compression:
Stored size: 1.05 KB
Contents
require 'test_helper' class SingleAddressTest < ActiveSupport::TestCase context "single attribute" do should "handle single values" do single = EmailAttribute::SingleAddress.new("foo@bar.com") assert_equal("foo@bar.com", single) end should "handle complex single values" do single = EmailAttribute::SingleAddress.new("Jeffrey Ching <ching.jeff@gmail.com>") assert_equal("Jeffrey Ching <ching.jeff@gmail.com>", single) end should "handle bad single values" do single = EmailAttribute::SingleAddress.new("some bad value") assert_equal("some bad value", single) end should "handle empty values" do single = EmailAttribute::SingleAddress.new("") assert_equal("", single) end should "handle nil values" do single = EmailAttribute::SingleAddress.new(nil) assert_equal("", single) end should 'responds to strip for strip_attributes gem' do single = EmailAttribute::SingleAddress.new(' foo@bar.com ') assert_equal 'foo@bar.com', single.strip end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
email_attribute-0.0.1 | test/unit/single_address_test.rb |