(t *testing.T)
| 4224 | } |
| 4225 | |
| 4226 | func TestGetDatabaseCollectionWithUserScopesNil(t *testing.T) { |
| 4227 | testCases := []struct { |
| 4228 | scope string |
| 4229 | collection string |
| 4230 | }{ |
| 4231 | { |
| 4232 | scope: "", |
| 4233 | collection: "", |
| 4234 | }, |
| 4235 | { |
| 4236 | scope: "foo", |
| 4237 | collection: "bar", |
| 4238 | }, |
| 4239 | } |
| 4240 | |
| 4241 | for _, testCase := range testCases { |
| 4242 | t.Run(fmt.Sprintf("%s.%s", testCase.scope, testCase.collection), func(t *testing.T) { |
| 4243 | |
| 4244 | db := Database{DatabaseContext: &DatabaseContext{}} |
| 4245 | col, err := db.GetDatabaseCollectionWithUser(testCase.scope, testCase.collection) |
| 4246 | require.Error(t, err) |
| 4247 | require.Nil(t, col) |
| 4248 | }) |
| 4249 | } |
| 4250 | } |
| 4251 | |
| 4252 | func TestGetDatabaseCollectionWithUserNoScopesConfigured(t *testing.T) { |
| 4253 | testCases := []struct { |
nothing calls this directly
no test coverage detected