Sha256: f2bd88902d8ba8989fb67680abb7f5200a6bde2fed026a750b0d3ba5291fa3be
Contents?: true
Size: 623 Bytes
Versions: 35
Compression:
Stored size: 623 Bytes
Contents
require 'test_helper' class ContactTest < Test::Unit::TestCase include TestHelper def setup @client = Xeroizer::PublicApplication.new(CONSUMER_KEY, CONSUMER_SECRET) @contact = @client.Contact.build end context "contact validators" do should "have a name" do assert_equal(false, @contact.valid?) blank_error = @contact.errors_for(:name).first assert_not_nil(blank_error) assert_equal("can't be blank", blank_error) @contact.name = "SOMETHING" assert_equal(true, @contact.valid?) assert_equal(0, @contact.errors.size) end end end
Version data entries
35 entries across 35 versions & 2 rubygems