func (s *searchBlackBoxTest) searchByURL(customHost, queryString string) *app.SearchWorkItemList {
	var resp interface{}
	var respSetter goatest.ResponseSetterFunc = func(r interface{}) { resp = r }
	newEncoder := func(io.Writer) goa.Encoder { return respSetter }
	s.svc.Encoder = goa.NewHTTPEncoder()
	s.svc.Encoder.Register(newEncoder, "*/*")
	rw := httptest.NewRecorder()
	query := url.Values{}
	u := &url.URL{
		Path:     fmt.Sprintf("/api/search"),
		RawQuery: query.Encode(),
		Host:     customHost,
	}
	req, err := http.NewRequest("GET", u.String(), nil)
	require.Nil(s.T(), err)
	prms := url.Values{}
	prms["q"] = []string{queryString} // any value will do
	goaCtx := goa.NewContext(goa.WithAction(s.svc.Context, "SearchTest"), rw, req, prms)
	showCtx, err := app.NewShowSearchContext(goaCtx, req, s.svc)
	require.Nil(s.T(), err)
	// Perform action
	err = s.controller.Show(showCtx)
	// Validate response
	require.Nil(s.T(), err)
	require.Equal(s.T(), 200, rw.Code)
	mt, ok := resp.(*app.SearchWorkItemList)
	require.True(s.T(), ok)
	return mt
}
// searchByURL copies much of the codebase from search_testing.go->ShowSearchOK
// and customises the values to add custom Host in the call.
searchByURL copies much of the codebase from search_testing.go->ShowSearchOK
and customises the values to add custom Host in the call.
// searchByURL copies much of the codebase from search_testing . go - > ShowSearchOK // and customises the values to add custom Host in the call .
func (s *searchBlackBoxTest) searchByURL(customHost, queryString string) *app.SearchWorkItemList {
	var resp interface{}
	var respSetter goatest.ResponseSetterFunc = func(r interface{}) { resp = r }
	newEncoder := func(io.Writer) goa.Encoder { return respSetter }
	s.svc.Encoder = goa.NewHTTPEncoder()
	s.svc.Encoder.Register(newEncoder, "*/*")
	rw := httptest.NewRecorder()
	query := url.Values{}
	u := &url.URL{
		Path:     fmt.Sprintf("/api/search"),
		RawQuery: query.Encode(),
		Host:     customHost,
	}
	req, err := http.NewRequest("GET", u.String(), nil)
	require.Nil(s.T(), err)
	prms := url.Values{}
	prms["q"] = []string{queryString} 
	goaCtx := goa.NewContext(goa.WithAction(s.svc.Context, "SearchTest"), rw, req, prms)
	showCtx, err := app.NewShowSearchContext(goaCtx, req, s.svc)
	require.Nil(s.T(), err)
	err = s.controller.Show(showCtx)
	require.Nil(s.T(), err)
	require.Equal(s.T(), 200, rw.Code)
	mt, ok := resp.(*app.SearchWorkItemList)
	require.True(s.T(), ok)
	return mt
}
func ( s * searchBlackBoxTest ) searchByURL ( customHost , queryString string ) * app . SearchWorkItemList { var resp interface { } var respSetter goatest . ResponseSetterFunc = func ( r interface { } ) { resp = r } newEncoder := func ( io . Writer ) goa . Encoder { return respSetter } s . svc . Encoder = goa . NewHTTPEncoder ( ) s . svc . Encoder . Register ( newEncoder , " " ) rw := httptest . NewRecorder ( ) query := url . Values { } u := & url . URL { Path : fmt . Sprintf ( " " ) , RawQuery : query . Encode ( ) , Host : customHost , } req , err := http . NewRequest ( " " , u . String ( ) , nil ) require . Nil ( s . T ( ) , err ) prms := url . Values { } prms [ " " ] = [ ] string { queryString } goaCtx := goa . NewContext ( goa . WithAction ( s . svc . Context , " " ) , rw , req , prms ) showCtx , err := app . NewShowSearchContext ( goaCtx , req , s . svc ) require . Nil ( s . T ( ) , err ) err = s . controller . Show ( showCtx ) require . Nil ( s . T ( ) , err ) require . Equal ( s . T ( ) , 200 , rw . Code ) mt , ok := resp . ( * app . SearchWorkItemList ) require . True ( s . T ( ) , ok ) return mt }
searchByURL copies much of the codebase from search_testing.go->ShowSearchOK
and customises the values to add custom Host in the call.
searchByURL copies much of the codebase from search_testing . go - > ShowSearchOK and customises the values to add custom Host in the call .
// any value will do // Perform action // Validate response