LibraryPanels: Remove unique name constraints (#113077)

This commit is contained in:
Ryan McKinley
2025-10-28 16:30:39 +03:00
committed by GitHub
parent 5670f1c34c
commit e1ddbda1bb
4 changed files with 509 additions and 6 deletions
@@ -14,13 +14,13 @@ import (
func TestIntegration_CreateLibraryElement(t *testing.T) {
testutil.SkipIntegrationTestInShortMode(t)
scenarioWithPanel(t, "When an admin tries to create a library panel that already exists, it should fail",
scenarioWithPanel(t, "When an admin tries to create a library panel with the same name, it should succeed",
func(t *testing.T, sc scenarioContext) {
// nolint:staticcheck
command := getCreatePanelCommand(sc.folder.ID, sc.folder.UID, "Text - Library Panel")
sc.reqContext.Req.Body = mockRequestBody(command)
resp := sc.service.createHandler(sc.reqContext)
require.Equal(t, 400, resp.Status())
require.Equal(t, 200, resp.Status())
})
scenarioWithPanel(t, "When an admin tries to create a library panel that does not exists, it should succeed",