Skip to content

Commit

Permalink
Fixed cleanupPromptPartials
Browse files Browse the repository at this point in the history
  • Loading branch information
developerkunal committed Sep 2, 2024
1 parent 5c92d64 commit fb83e29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion management/prompt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func TestPromptManager_SetPartials(t *testing.T) {
assert.NoError(t, err)
assert.Equal(t, expected, actual)
}

func TestPromptManager_GetPartialsGuardGuardError(t *testing.T) {
configureHTTPTestRecordings(t)

Expand All @@ -135,6 +136,7 @@ func TestPromptManager_GetPartialsGuardGuardError(t *testing.T) {
assert.Error(t, err)
assert.ErrorContains(t, err, "cannot customize partials for prompt")
}

func TestPromptManager_SetPartialsGuardGuardError(t *testing.T) {
configureHTTPTestRecordings(t)

Expand Down Expand Up @@ -294,6 +296,6 @@ func givenAPartialPrompt(t *testing.T, prompt PromptType) *PromptScreenPartials
func cleanupPromptPartials(t *testing.T, prompt PromptType) {
t.Helper()

err := api.Prompt.SetPartials(context.Background(), prompt, &PromptScreenPartials{})
err := api.Prompt.DeletePartials(context.Background(), prompt)
assert.NoError(t, err)
}

0 comments on commit fb83e29

Please sign in to comment.