Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
resource: 'Posts',
id: 3
}))
siteApp.dispatch(railsActions.show({
resource: 'Posts',
id: 5,
controller: 'foo_posts'
}))
siteApp.dispatch(railsActions.show({
resource: 'Comments',
id: 15
}))
siteApp.dispatch(railsActions.index({resource: 'Photos'}))
.then(resp => {
console.log('async photos: ', resp)
})
.catch(err => {
console.log('error' , err)
})
// siteApp.dispatch({
// type: 'User.SHOW'
// })
siteApp.dispatch(railsActions.show({
resource: 'User'
}))
siteApp.dispatch({
it('should set a loading state on the collection', () => {
indexReducerState = indexReducer(indexReducerState, railsActions.index({ resource: 'Posts' }))
expect(indexReducerState).toEqual(
{
Posts: {
loading: true,
loadingError: undefined
},
User: {
loading: false,
loadingError: undefined
}
}
)
})