make sure we check this in coding task

This commit is contained in:
Robin Olsen
2026-03-20 20:53:14 +01:00
parent 24e881b5fd
commit ce944085fe

View File

@@ -6,6 +6,7 @@ import (
"strings"
"charm.land/huh/v2"
"github.com/LazyBachelor/LazyPM/internal/models"
"github.com/LazyBachelor/LazyPM/internal/utils/check"
)
@@ -141,7 +142,9 @@ func (t *CodingTask) Validate(ctx context.Context) ValidationFeedback {
return expect.Fatal("Issue was deleted or could not be found")
}
expect.Equal(issue.Assignee, "Me", "Issue Assignee")
if !expect.Equal(issue.Assignee, "Me", "Issue Assignee").Valid() {
return expect.ValidationFeedback
}
if _, err := os.Stat("./code.txt"); os.IsNotExist(err) {
expect.Fail("The code.txt file should exist on the desktop.")
@@ -161,6 +164,11 @@ func (t *CodingTask) Validate(ctx context.Context) ValidationFeedback {
}
expect.Contains(code, "go.mongodb.org/mongo-driver v1.17.9", "MongoDB Driver version")
if !expect.Valid() {
return expect.ValidationFeedback
}
expect.Equal(issue.Status, models.StatusClosed, "Issue Status")
return expect.Complete()
}