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

Version Path
xeroizer-float-2.15.3.3 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.2 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.1 test/unit/models/contact_test.rb
xeroizer-2.15.3 test/unit/models/contact_test.rb
xeroizer-2.15.2 test/unit/models/contact_test.rb
xeroizer-2.15.1 test/unit/models/contact_test.rb
xeroizer-2.15.0 test/unit/models/contact_test.rb
xeroizer-0.5.2 test/unit/models/contact_test.rb
xeroizer-0.5.1 test/unit/models/contact_test.rb
xeroizer-0.5.0 test/unit/models/contact_test.rb
xeroizer-0.4.4 test/unit/models/contact_test.rb
xeroizer-0.4.3 test/unit/models/contact_test.rb
xeroizer-0.4.2 test/unit/models/contact_test.rb
xeroizer-0.4.1 test/unit/models/contact_test.rb
xeroizer-0.4.0 test/unit/models/contact_test.rb