Skip to content

Commit

Permalink
fixed list handler test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmarcoin committed May 14, 2024
1 parent 1c46d47 commit fcfd3f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ops_scripts_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ func TestApi_OpsScripts_ListHandler(t *testing.T) {
ass.Equal(http.StatusOK, response.StatusCode, "body de la réponse : %s", body)
actual, err := decodeRefreshArray(body)
ass.Nil(err)
ass.Contains(actual, *current)
ass.Conditionf(func() bool {
// tous les refresh doivent avoir le status `failed`
for _, current := range actual {
Expand All @@ -158,6 +157,8 @@ func TestApi_OpsScripts_ListHandler(t *testing.T) {
}
return true
}, "Un des refresh n'a pas le status `failed`")

ass.Contains(actual, *current)
}

func decodeRefreshArray(body []byte) ([]scripts.Run, error) {
Expand Down

0 comments on commit fcfd3f2

Please sign in to comment.