refactor spec with Goliath::TestHelper's with_api helper