Replies: 2 comments 24 replies
-
|
Is it possible to test like this or should I stub that email function differently? As you can see I am quite new to rust world so help is appreciated. |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Is |
Beta Was this translation helpful? Give feedback.
24 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am trying to make integration test by mocking my email module or its function and injecting it into app. The idea is to test my endpoint via integration test by mocking the email module since obviously I don't want to spam emails during testing. Somehow I cannot get this mocking done correctly and my AppState struct returns this kind of error and I cannot compile the project / run tests:
Here I have my mock implementation:
And here is my setup_test_app() function that gives me above error when instantiating AppState:
My AppState is structured like this:
My app structure is like this:
Any ideas what is going wrong here? I have tried to find examples where people inject their mocks to real app but can't find similar ones.
Beta Was this translation helpful? Give feedback.
All reactions