add tests for publish