Closed sunscreem closed 4 years ago
Hi,
Yes, this is because Jetstream uses Inertia::share
to share the user to Inertia globally, during which it adds the two_factor_enabled
key: ShareInertiaData.php#L45-L49
My recommendation would be to basically what Jetstream does there, by manually doing ->toArray()
, followed by manually merging in the key just before asserting so that the outcome is identical.
Hope this helps!
Perfect! As you can still trying to wrap about whats inertia.js and what's Jetstream!
I'm rapidly falling in love with this package.
Just working through the examples in the readme and this one where you assert againsts a model:
...fails (with a clean laravel/jetstream install - not using teams)
Maybe Laravel added the
two_factor_enable
recently or I need to tweak my user model?