const action = { id, value, type: types.VALUE_CHANGED } const newState = main(INITIAL_STATE, action) expect(newState.getIn([ 'values', id ])).toBe(value) }) it('Set as processing and clear erros when login is send ', ()=>{ const newState = main(INITIAL_STATE, action) expect(newState.get('hasErrors')).toBe(true) expect(newState.getIn([ 'errors', 'foo' ])).toEqual('bar')
export function getMeta(appInfo, fullpath, propertys, appQuery) { var meta = appQuery ? (cache.meta.getIn([appInfo.name, appQuery, 'meta']) || cache.meta.getIn([appInfo.name, 'meta'])) : cache.meta.getIn([appInfo.name, 'meta']) (cache.meta.getIn([appInfo.name, appQuery, 'metaMap']) || cache.meta.getIn([appInfo.name, 'metaMap'])) : cache.meta.getIn([appInfo.name, 'metaMap']) const currentMeta = path ? meta.getIn(path.split('.')) : meta var val = currentMeta.getIn(p.split('.')) ret[p] = (val && val.toJS) ? val.toJS() : val let val = currentMeta.getIn(propertys.split('.')) return (val && val.toJS) ? val.toJS() : val