Closed FelipeBodelon closed 7 months ago
See https://github.com/janko/rodauth-rails/issues/275#issuecomment-1938188962. TL;DR replace include Rodauth::Model(RodauthMain)
with include Rodauth::Rails.model
in your account model. This will be fixed in the upcoming release, at the install generator level.
@FelipeBodelon would be you willing to share your factory_bot factory for account? i'm trying to get testing working with minitest and factory_bot, and i'm trying to wrap my head around how to actually produce a valid account.
While trying to replace my previous auth helpers (from devise) to work with rodauth JSON requests, I created some of my own helpers as suggested by the docs/wiki and some discussions.
I figured my login endpoint wasn't working properly so I tried testing them with the following RSpec request spec (using factory_bot):
I get a failure on Account creation, either way if I try with factory_bot
create
or directly on a before hook.This only fails on my local test environment, and works properly on development.