Fixing mock promise