add test for publish