pace-running / pace3

used for "lauf gegen rechts 2023"
2 stars 1 forks source link

Refactor backend to easily write integration tests #80

Closed qutax closed 1 year ago

qutax commented 1 year ago

Context:
Writing integration tests is currently hard because it isn't easy to replace dependencies like the pgconnection.

The goal of this story is to refactor the main function and the handlers to make integration testing easier.

Existing integration tests should also be moved to a separate directory, /backend/tests/, in order to easily distinguish them from unit tests. See also: https://doc.rust-lang.org/rust-by-example/testing/integration_testing.html