I have made a trigger for the object Assignment. When an assignment is inserted the after insert trigger should check if there is a linked project. If this is not the case it should make one.
Now I am working on a test class. All the other triggers on Assignment are being called, but for some reason after insert is not.... In the test class I do insert an assignment, so it should fire, right?
Is there a logical reason for this?
thanks in advance
EDIT:
public static void isAfterInsert(List<Assignment__c> newList, Map<id,sObject> newMap){
List<Project__c> projectList = new List<Project__c>();
for(Assignment__c item: newList){
if(item.Project__c != null){
Project__c project;
project = new Project__c();
project.Id = item.Project__c;
project.RecordStatus__c = item.RecordStatus__c;
project.OwnerId = item.OwnerId;
project.EmployeeID__c = item.Employee__c;
projectList.add(project);
}
}
update projectList;
}