require 'test_helper'

class UserTest < ActiveSupport::TestCase
  def test_should_not_be_valid_without_email
    p = User.create(:name => 'Nala', :email => nil, :password => 'meow')
    assert p.errors.on(:email)
  end

  def test_should_have_an_ads_association
    assert_equal [ ads(:one), ads(:two) ],
      users(:one).ads
  end
end
