tenseleyflow/shithub / 722bd7c

Browse files

Fix profile pin test assertions

Authored by espadonne
SHA
722bd7c5b212dac2dfc0e4638834a25de9ba0cb0
Parents
7f720ee
Tree
50280e0

1 changed file

StatusFile+-
M internal/web/handlers/profile/profile_test.go 3 3
internal/web/handlers/profile/profile_test.gomodified
@@ -386,7 +386,7 @@ func TestProfile_UserPinsCanBeCustomized(t *testing.T) {
386386
 	}
387387
 
388388
 	got = env.getAs(t, "/alice", usersdb.User{})
389
-	for _, want := range []string{"PINS=2", "PINNAMES=shithub;loader;", "SELECTED=loader;shithub;"} {
389
+	for _, want := range []string{"PINS=2", "PINNAMES=shithub;loader;", "SELECTED=shithub;loader;"} {
390390
 		if !strings.Contains(got, want) {
391391
 			t.Fatalf("missing %q in body: %s", want, got)
392392
 		}
@@ -401,7 +401,7 @@ func TestProfile_OrgPinsFallbackUntilCustomized(t *testing.T) {
401401
 	env := setupProfileEnv(t)
402402
 	owner := env.insertUser(t, "alice", "Alice", "")
403403
 	orgID := env.insertOrg(t, "tenseleyflow", "tenseleyFlow", "workflows", owner)
404
-	shithubID := env.insertOrgRepo(t, orgID, "shithub", "GitHub clone", "public", "Go", 5, 1)
404
+	env.insertOrgRepo(t, orgID, "shithub", "GitHub clone", "public", "Go", 5, 1)
405405
 	loaderID := env.insertOrgRepo(t, orgID, "loader", "local assistant", "public", "Python", 1, 0)
406406
 	env.insertOrgRepo(t, orgID, "private-roadmap", "hidden", "private", "Rust", 9, 0)
407407
 
@@ -426,7 +426,7 @@ func TestProfile_OrgPinsFallbackUntilCustomized(t *testing.T) {
426426
 			t.Fatalf("missing %q in body: %s", want, got)
427427
 		}
428428
 	}
429
-	if strings.Contains(got, "PINNAMES=shithub;") || strings.Contains(got, strconv.FormatInt(shithubID, 10)) {
429
+	if strings.Contains(got, "PINNAMES=shithub;") || strings.Contains(got, "PINNAMES=loader;shithub;") {
430430
 		t.Fatalf("custom org pins fell back to the synthetic set: %s", got)
431431
 	}
432432
 }