this is the trigger i have wriiten
trigger caseAssignWebCaseToAccountOwner on Case (before update) {
for(case c :trigger.new){
ID profile = [select id from Profile where name = 'System Administrator'].id;
user u = [Select id,name,IsActive from user where ProfileId =: profile limit 1 ];
if(c.Origin == 'Portal' && c.SSP_owner_Update__c==false && c.accountid!=null && u.isactive == True){
account a = [select id,name,OwnerId from account where id=:c.accountid];
c.ownerid=a.ownerID;
c.SSP_owner_Update__c=true;
}
else if(c.Origin == 'Portal' && u.isactive == false )
c.ownerid='005Q0000000f95r';
}
}
the test case i have wriiten getting 87 percent not covering the else part plz help
Here is your test class
let me know if any issues in it.