Changeset 0.9.3 (#53)
This commit is contained in:
@@ -1547,7 +1547,7 @@ func TestUserJourney_FullMatrix(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("admin_models_shows_all_including_disabled", func(t *testing.T) {
|
||||
t.Run("admin_models_shows_global_only", func(t *testing.T) {
|
||||
w := h.request("GET", "/api/v1/admin/models", adminToken, nil)
|
||||
if w.Code != http.StatusOK {
|
||||
t.Fatalf("admin/models: %d", w.Code)
|
||||
@@ -1555,9 +1555,9 @@ func TestUserJourney_FullMatrix(t *testing.T) {
|
||||
var resp map[string]interface{}
|
||||
decode(w, &resp)
|
||||
allModels := resp["models"].([]interface{})
|
||||
// global(3) + team(2) + member-byok(1) + outsider-byok(1) = 7
|
||||
if len(allModels) < 7 {
|
||||
t.Fatalf("admin/models should show all 7 catalog entries, got %d", len(allModels))
|
||||
// Admin should see only global-scope models (3), not team(2) or BYOK(2)
|
||||
if len(allModels) != 3 {
|
||||
t.Fatalf("admin/models should show 3 global entries, got %d", len(allModels))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user