(t *testing.T)
| 146 | } |
| 147 | |
| 148 | func TestAccessFunctionTakesNullUser(t *testing.T) { |
| 149 | ctx := base.TestCtx(t) |
| 150 | mapper := NewChannelMapper(ctx, `function(doc) {access(null, ["ginger", "earl grey", "green"])}`, 0) |
| 151 | res, err := mapper.MapToChannelsAndAccess(ctx, parse(t, `{}`), `{}`, emptyMetaMap(), noUser) |
| 152 | assert.NoError(t, err, "MapToChannelsAndAccess failed") |
| 153 | assert.Equal(t, AccessMap{}, res.Access) |
| 154 | } |
| 155 | |
| 156 | func TestAccessFunctionTakesNullChannels(t *testing.T) { |
| 157 | ctx := base.TestCtx(t) |
nothing calls this directly
no test coverage detected