updated publish funtion within tests to run without a web request