(t *testing.T)
| 121 | } |
| 122 | |
| 123 | func TestRecordQueryAll(t *testing.T) { |
| 124 | t.Parallel() |
| 125 | |
| 126 | app, _ := tests.NewTestApp() |
| 127 | defer app.Cleanup() |
| 128 | |
| 129 | type customStructs struct { |
| 130 | Id string `db:"id" json:"id"` |
| 131 | } |
| 132 | |
| 133 | type mockRecordProxy struct { |
| 134 | core.BaseRecordProxy |
| 135 | } |
| 136 | |
| 137 | scenarios := []struct { |
| 138 | name string |
| 139 | collection string |
| 140 | recordIds []any |
| 141 | result any |
| 142 | }{ |
| 143 | { |
| 144 | "slice of Record models", |
| 145 | "demo1", |
| 146 | []any{"84nmscqy84lsi1t", "al1h9ijdeojtsjy"}, |
| 147 | &[]core.Record{}, |
| 148 | }, |
| 149 | { |
| 150 | "slice of pointer Record models", |
| 151 | "demo1", |
| 152 | []any{"84nmscqy84lsi1t", "al1h9ijdeojtsjy"}, |
| 153 | &[]*core.Record{}, |
| 154 | }, |
| 155 | { |
| 156 | "slice of Record proxies", |
| 157 | "demo1", |
| 158 | []any{"84nmscqy84lsi1t", "al1h9ijdeojtsjy"}, |
| 159 | &[]mockRecordProxy{}, |
| 160 | }, |
| 161 | { |
| 162 | "slice of pointer Record proxies", |
| 163 | "demo1", |
| 164 | []any{"84nmscqy84lsi1t", "al1h9ijdeojtsjy"}, |
| 165 | &[]mockRecordProxy{}, |
| 166 | }, |
| 167 | { |
| 168 | "slice of custom structs", |
| 169 | "demo1", |
| 170 | []any{"84nmscqy84lsi1t", "al1h9ijdeojtsjy"}, |
| 171 | &[]customStructs{}, |
| 172 | }, |
| 173 | { |
| 174 | "slice of pointer custom structs", |
| 175 | "demo1", |
| 176 | []any{"84nmscqy84lsi1t", "al1h9ijdeojtsjy"}, |
| 177 | &[]customStructs{}, |
| 178 | }, |
| 179 | } |
| 180 |
nothing calls this directly
no test coverage detected
searching dependent graphs…