-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Habilidade de selecionar um item específico #178
Changes from 5 commits
f085363
15b374d
0647a80
b7dd39a
c053bd6
a67ff5b
6663221
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,6 +107,19 @@ func TestCompanyHandler(t *testing.T) { | |
http.StatusOK, | ||
expected, | ||
}, | ||
//Solicitação de campos específicos | ||
{ | ||
http.MethodGet, | ||
"/19.131.243/0001-97?fields=uf,cep", | ||
http.StatusOK, | ||
`{"cep":"","uf":""}`, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. O que acha de usar, nesse caso de teste, campos que tem valores em There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Claro, incluirei as mudanças! |
||
}, | ||
{ | ||
http.MethodGet, | ||
"/19131243000197?fields=xolofompila", | ||
http.StatusNotFound, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Não acho que There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Pode ser, na minha cabeça eu estava pensando "o campo não foi encontrado". |
||
`{"message":"Dados xolofompila do CNPJ 19.131.243/0001-97 não encontrados."}`, | ||
} | ||
} | ||
|
||
for _, c := range cases { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me pergunto se
if
é necessário. Tenho a impressão que se ocommand
forrazao_social
,strings.Split(command)
funcionaria igual: https://go.dev/play/p/Yqn_OiOxgM_tThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tem razão. Vou remover este if.