test/unit/basic_test.rb in activesalesforce-0.2.7 vs test/unit/basic_test.rb in activesalesforce-0.2.8

- old
+ new

@@ -8,10 +8,12 @@ class Contact < ActiveRecord::Base end +class Department < ActiveRecord::Base +end module Asf module UnitTests @@ -21,11 +23,11 @@ attr_reader :contact def initialize(test_method_name) super(test_method_name) - #force_recording :test_get_created_by_from_contact + #force_recording :test_master_detail end def setup puts "\nStarting test '#{self.class.name.gsub('::', '')}.#{method_name}'" @@ -45,11 +47,11 @@ super end def test_count_contacts - assert_equal 27, Contact.count + assert Contact.count > 0 end def test_create_a_contact contact.id end @@ -89,9 +91,21 @@ contact.notes << n1 contact.notes << n2 n1.save n2.save + end + + def test_master_detail + department = Department.new(:department_description__c => 'DutchTestDepartment description') + department.save + department.reload + + job = Job.new(:name => "DutchJob") + + department.jobs__c << job + + department.destroy end end end \ No newline at end of file