You need to query the PersonContactId field and use that instead. 001 is always an Account Id, while 003 is always a Contact Id.
Should be more like:
return [SELECT FirstName, LastName, PersonContactId, PersonEmail FROM Account WHERE Id = :accountList];
Then you can:
Instead of using return value, you can directly use the RestContext response.
As per the documentation here below is true for responseBody property of RestResponse class
The response is either the serialized form of the method return value or it's the value of the responseBody property based on the following rules:
If the method returns void, then Apex ...
When you bypass trigger logic, you need to bookend your disablement. Typical flow is as below:
@IsTest static void myTest()
// disable trigger
// insert data
// enable trigger
// update data
// assert against behavior
That object is a platform event.
You can view that in Setup > Platform Events.
The trigger is written on insert and it is likely not getting covered because of the commented line in the test class
which will invoke this trigger. You should uncomment this line an run the test.
Make sure to pupulate details like ...
From my perspective a unit test tests an Apex class/method in isolation. The flow is external to the Apex and isn't something to be tested together with the Apex code in a unit test. Sure, you might want to do that in an integration test, but this isn't needed to increase code coverage.
There are various ways to deal with this sort of scenario. My ...