bkonkle / rust-example-caster-api

DEPRECATED: A demo Rust API implementation using Tokio, Axum, async-graphql, and SeaORM
MIT License
130 stars 13 forks source link

Question on user_factory for testing #75

Closed rezmuh closed 1 year ago

rezmuh commented 1 year ago

I found this in the service_test of user domain:

https://github.com/bkonkle/rust-example-caster-api/blob/7f60ae0558ecf606ddc4b7e0756d382c1dd6e0b6/libs/domains/src/users/service_test.rs#L12

I cloned the project but could not find the definition of create_user_with_username function. Where is it defined?

Thank you

bkonkle commented 1 year ago

Hi! This is a test file that was accidentally left behind. 😅 I forgot to delete that file when I moved the User Service tests to libs/domains/src/users/tests/service_test.rs.

The user_factory was leftover from a previous iteration. The last version of it can be found here. Afterwards, I removed the factories and went to using the Dummy derive from the fake crate.

I'll remove the old files now. Thank you for letting me know!

rezmuh commented 1 year ago

Thanks!