TestViewSubsetWorkspace ensures WorkspaceTable is a subset of Workspace
(t *testing.T)
| 86 | |
| 87 | // TestViewSubsetWorkspace ensures WorkspaceTable is a subset of Workspace |
| 88 | func TestViewSubsetWorkspace(t *testing.T) { |
| 89 | t.Parallel() |
| 90 | table := reflect.TypeOf(database.WorkspaceTable{}) |
| 91 | joined := reflect.TypeOf(database.Workspace{}) |
| 92 | |
| 93 | tableFields := allFields(table) |
| 94 | joinedFields := allFields(joined) |
| 95 | if !assert.Subset(t, fieldNames(joinedFields), fieldNames(tableFields), "table is not subset") { |
| 96 | t.Log("Some fields were added to the Workspace Table without updating the 'workspaces_expanded' view.") |
| 97 | t.Log("See migration 000262_workspace_with_names.up.sql to create the view.") |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | func TestViewSubsetChat(t *testing.T) { |
| 102 | t.Parallel() |
nothing calls this directly
no test coverage detected