mirror of
https://github.com/warmbly/warmbly.git
synced 2026-10-20 00:03:07 +00:00
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
25 lines
651 B
Go
25 lines
651 B
Go
package campaign
|
|
|
|
import (
|
|
"context"
|
|
"testing"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/warmbly/warmbly/internal/errx"
|
|
"github.com/warmbly/warmbly/internal/models"
|
|
)
|
|
|
|
func TestUpdateRejectsMalformedRelationsBeforeRepository(t *testing.T) {
|
|
for _, data := range []*models.UpdateCampaign{
|
|
{EmailTags: []string{"cro-c6"}},
|
|
{EmailTags: []string{uuid.NewString(), "cro-c6"}},
|
|
{Folders: []string{"None"}},
|
|
{Folders: []string{uuid.NewString(), ""}},
|
|
} {
|
|
_, err := (&campaignService{}).Update(context.Background(), "org", "campaign", data)
|
|
if err == nil || err.Code != errx.BadRequest {
|
|
t.Fatalf("error=%v; want bad_request", err)
|
|
}
|
|
}
|
|
}
|