I'm trying to learn testing - so this question may be silly. Sorry in advance...
I have a model calls PathState which has an execute method which calls a sidekiq worker to do some work. The sidekiq worker receives the PathState object id, then looks up the PathState, then attempts to perform the path_state.action. When I run the test I always see:
Couldn't find PathState with 'id'=980190977
That id is present, in the test database. But it looks like sidekiq is looking for it in the development database.
I tried starting sidekiq with -e test, but it still doesn't look in the test database.
What am I doing wrong?
Aucun commentaire:
Enregistrer un commentaire