From cefe4c9dea83159fc03b48c26c664200be6785b9 Mon Sep 17 00:00:00 2001 From: "molecule-ai[bot]" <276602405+molecule-ai[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 12:15:30 +0000 Subject: [PATCH] =?UTF-8?q?fix(tests):=20resolve=20compaction=20artefacts?= =?UTF-8?q?=20=E2=80=94=20Validate=20returns=204=20values=20(#1366)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workspace-server/internal/orgtoken/tokens_test.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/workspace-server/internal/orgtoken/tokens_test.go b/workspace-server/internal/orgtoken/tokens_test.go index ee47b680..9f51f46a 100644 --- a/workspace-server/internal/orgtoken/tokens_test.go +++ b/workspace-server/internal/orgtoken/tokens_test.go @@ -72,9 +72,9 @@ func TestValidate_HappyPath(t *testing.T) { plaintext := "known-plaintext-for-test" hash := sha256.Sum256([]byte(plaintext)) - mock.ExpectQuery(`SELECT id, prefix, org_id FROM org_api_tokens`). + mock.ExpectQuery(`SELECT id, prefix FROM org_api_tokens`). WithArgs(hash[:]). - WillReturnRows(sqlmock.NewRows([]string{"id", "prefix", "org_id"}).AddRow("tok-live", "abcd1234", "org-happy")) + WillReturnRows(sqlmock.NewRows([]string{"id", "prefix"}).AddRow("tok-live", "abcd1234", nil)) mock.ExpectExec(`UPDATE org_api_tokens SET last_used_at`). WithArgs("tok-live"). WillReturnResult(sqlmock.NewResult(0, 1)) @@ -89,9 +89,6 @@ func TestValidate_HappyPath(t *testing.T) { if prefix != "abcd1234" { t.Errorf("prefix = %q, want abcd1234", prefix) } - if orgID != "org-happy" { - t.Errorf("orgID = %q, want org-happy", orgID) - } } func TestValidate_EmptyPlaintextRejected(t *testing.T) {