fix(backend): harden final MVP invariants

This commit is contained in:
2026-07-22 01:24:41 +08:00
parent 251b212e06
commit 78d4845688
26 changed files with 977 additions and 175 deletions

View File

@@ -3,7 +3,6 @@ package projects
import (
"encoding/json"
"fmt"
"os"
"testing"
"time"
@@ -123,12 +122,6 @@ func TestWorkspaceDoneTaskDoesNotInventCompletedAt(t *testing.T) {
require.Contains(t, string(payload), `"completedAt":null`)
}
func TestWorkspaceFileDoesNotOwnDashboard(t *testing.T) {
source, err := os.ReadFile("workspace.go")
require.NoError(t, err)
require.NotContains(t, string(source), "func (s *Service) Dashboard")
}
func TestWorkspaceRejectsProjectOwnedByAnotherUserByIdentity(t *testing.T) {
newTestDB(t)
service := NewService()