tests now working with promises