feat(invitations): check contact grants on every read, cap pending invitations, and expire them at the deadline
This commit is contained in:
1 parent
676b3c6e24
commit
12a7213d4a
67 files changed
+4255
-149
No files matched your search
@@ -4,6 +4,7 @@ import (
|
||||
"context"
|
||||
"log/slog"
|
||||
"net/http"
|
||||
"slices"
|
||||
"strings"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -55,10 +56,14 @@ func TestBuildJobWorkerSkipsWithoutWork(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestBootstrapRegistersTheReviewJobKind(t *testing.T) {
|
||||
func TestBootstrapRegistersTheProductJobKinds(t *testing.T) {
|
||||
handlers := jobHandlers(slog.New(slog.DiscardHandler))
|
||||
if len(handlers) != 1 || handlers[0].JobKind() != "assessment.signal_review" {
|
||||
t.Fatalf("jobHandlers() = %v; update the documentation when the registered job kinds change", handlers)
|
||||
kinds := make([]string, 0, len(handlers))
|
||||
for _, handler := range handlers {
|
||||
kinds = append(kinds, handler.JobKind())
|
||||
}
|
||||
if !slices.Equal(kinds, []string{"assessment.signal_review", "invitation.response_deadline"}) {
|
||||
t.Fatalf("jobHandlers() kinds = %v; update the documentation when the registered job kinds change", kinds)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user