You need to sign in to do that
Don't have an account?
newbiewithapex
how to write test class to cover getProfileName() method?
Here is my method and I need someone to helo me figure out how to write test class for this method.
@AuraEnabled
public static string getProfileName(){
Id profileId=userinfo.getProfileId();
String profileName=[Select Id,Name from Profile where Id=:profileId].Name;
return profileName;
}
@AuraEnabled
public static string getProfileName(){
Id profileId=userinfo.getProfileId();
String profileName=[Select Id,Name from Profile where Id=:profileId].Name;
return profileName;
}
Best Answer chosen by newbiewithapex
Raj Vakati
Use this