Fix EZP-21671: add tests for Promise part of the CAPI

JIRA issue: https://jira.ez.no/browse/EZP-21671

Done.