module GdsApi::TestHelpers::Search
def stub_any_search_post(index: nil)
def stub_any_search_post(index: nil) if index stub_request(:post, %r{#{SEARCH_ENDPOINT}/#{index}/documents}) .to_return(status: [202, "Accepted"]) else stub_request(:post, %r{#{SEARCH_ENDPOINT}/documents}) .to_return(status: [202, "Accepted"]) end end