pow-auth / pow

Robust, modular, and extendable user authentication system
https://powauth.com
MIT License
1.58k stars 152 forks source link

Fix type issue if the user model has attribute with `data` name #729

Closed oivoodoo closed 2 months ago

danschultzer commented 3 months ago

Great catch. Adding the field to Pow.Test.Ecto.Users.User does give us a guarantee that we always test it, but I think it may be better to be more precise and just test the functions explicitly in Pow.Ecto.Schema.ChangesetTest with a struct that has a data attribute. It seems that in other modules I did check for Changeset struct correctly, but in several functions in Pow.Ecto.Schema.Changeset it is missing.

oivoodoo commented 3 months ago

@danschultzer you are definitely right about it, let me give a try to update changeset test cases. I had the issue with my user model in the project and tried to figure out the problem and come with fast fix to resolve the problem. Thank you!

oivoodoo commented 2 months ago

Hi @danschultzer

Could you check the current changes when you have time?

Thank you!

danschultzer commented 2 months ago

❤️

danschultzer commented 2 months ago

Released with v1.0.38