When I run a test in developer I get 77% apparently. This is the entire apex trigger and the only thing that is being attempted to be deployed in the org:
trigger Requestor on Case (before insert) {
// user defaultuser = [select id from user where name = 'default user'];
for (Requestor__c record:trigger.new) {
if(record.Product_Owner__c ==null) {
record.Product_Owner__c = userinfo.getUserId();
}
}
}
Here are the 4 Apex Test Failures:
LeadTriggerTesttestMcSubscriberSyncDateOnUpdateSystem.AssertException: Assertion Failed: Expected: null, Actual: 2016-11-16 14:31:03 Stack Trace: Class.MC4SF.LeadTriggerTest.testMcSubscriberSyncDateOnUpdate: line 101, column 1
MappingsControllerTesttestMappingsControllerSystem.QueryException: List has no rows for assignment to SObject Stack Trace: Class.MC4SF.MappingsControllerTest.testMappingsController: line 28, column 1
MembershipControllerTesttestContactMembershipSystem.DmlException: Insert failed. First exception on row 0; first error: DUPLICATES_DETECTED, You're creating a duplicate record. We recommend you use an existing record instead.: [] Stack Trace: Class.MC4SF.MembershipControllerTest.testContactMembership: line 13, column 1
UserTriggerTesttestDeactivatingHourlyJobOwnerSystem.AsyncException: The Apex job named "MailChimp Hourly Sync" is already scheduled for execution. Stack Trace: Class.MC4SF.UserTriggerTest.testDeactivatingHourlyJobOwner: line 43, column 1
How do I make sure I am at over 75% coverage, also can the code be left as is, or does it have to be more complex to be approved for our organization? We don't have any other triggers running so I am not sure why this wouldn't just work.