summaryrefslogtreecommitdiff
path: root/test/unit/conference_invitee_test.rb
blob: bcc4c9b16c8c1e056d307200913b1ad02ef3767b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'test_helper'

class ConferenceInviteeTest < ActiveSupport::TestCase
  
  def test_should_have_a_valid_factory
    assert Factory.build(:conference_invitee).valid?
  end
  
  test "parent conference should not have a phone number twice" do
    invitee = Factory.create(:conference_invitee)
    conference = invitee.conference
    phone_number = PhoneNumber.new(:number => invitee.phone_number.number)
    invitee_bad = conference.conference_invitees.build(:phone_number => phone_number)
    assert !invitee_bad.valid?    
  end
  
end