afawcett/apex-sobjectdataloader — pull request #1 by mickle00 (2012-12-17 22:37:01+00:00)
Title: Adding RecordTypeId to the relationshipWhitelist + unitTest

Deserializing sObjects with RecordTypes would try to insert new RecordTypes during the deserialize process, which throws a DML exception.

I've added the RecordTypeId to the relationshipWhitelist, and also added a testMethod that compiles and passes in orgs with, and without RecordTypes enabled.

The test doesn't dynamically determine if there's an sObject with multiple RecordTypes, and instead is testing only at the Account object with multiple RecordTypes. While it may be a nice addition to improve the testMethod to determine the best sObject to test, if the Account doesn't have multiple RecordTypes, the test will simply pass, as it never goes into the initial if branch.