LukeMathWalker / zero-to-production

Code for "Zero To Production In Rust", a book on API development using Rust.
https://www.zero2prod.com
Apache License 2.0
5.86k stars 519 forks source link

Missing the implementation of test_user.login() #244

Closed chdalski closed 9 months ago

chdalski commented 9 months ago

In Chapter 11.5 Requirements As Tests #1 a new test called newsletter_creation_is_idempotent() is introduced.

The test uses a function to login the user which is never introduced before: https://github.com/LukeMathWalker/zero-to-production/blob/236cef05a5f4bbdeb2e10103bee5c739795befeb/tests/api/newsletter.rs#L153

However, the source at the end of Chapter 10 contains the function in question: https://github.com/LukeMathWalker/zero-to-production/blob/a4dfa642643419094c8779faec21a712ff33c066/tests/api/helpers.rs#L253-L259

Btw.: there is also an unused file: https://github.com/LukeMathWalker/zero-to-production/blob/236cef05a5f4bbdeb2e10103bee5c739795befeb/tests/api/test_user.rs

chdalski commented 9 months ago

Update: The same as for login() applies to: https://github.com/LukeMathWalker/zero-to-production/blob/a4dfa642643419094c8779faec21a712ff33c066/tests/api/helpers.rs#L117-L139

chdalski commented 9 months ago

My bad it seems. These things seem to be expected parts of the exercise from Chapter 10.10.