Add test for promises