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-2.15.9 test/unit/models/contact_test.rb
xeroizer-2.15.8 test/unit/models/contact_test.rb
xeroizer-2.15.7 test/unit/models/contact_test.rb
xeroizer-2.15.6 test/unit/models/contact_test.rb
xeroizer-float-2.15.5.2 test/unit/models/contact_test.rb
xeroizer-float-2.15.5.1 test/unit/models/contact_test.rb
xeroizer-2.15.5 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.16 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.15 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.14 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.13 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.12 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.11 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.10 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.9 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.8 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.7 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.6 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.5 test/unit/models/contact_test.rb
xeroizer-float-2.15.3.4 test/unit/models/contact_test.rb