Fixing tests of #2746 to use promisses style