From fb83e299a55f218c231b99037e0fef5ceeaf3c1a Mon Sep 17 00:00:00 2001 From: Kunal Dawar Date: Mon, 2 Sep 2024 20:35:40 +0530 Subject: [PATCH] Fixed cleanupPromptPartials --- management/prompt_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/management/prompt_test.go b/management/prompt_test.go index 64249777..95d9fe05 100644 --- a/management/prompt_test.go +++ b/management/prompt_test.go @@ -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) @@ -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) @@ -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) }