beyond-all-reason / teiserver

Middleware server for online gaming
https://www.beyondallreason.info/
MIT License
46 stars 46 forks source link

Fix create balance when incomplete data #315

Closed jauggy closed 1 month ago

jauggy commented 1 month ago

Fixes #314

Unit Test Steps

mix test --only balance_test

Test Steps

Run local browser. Login as admin. Go to Admin > Matches > Show a match > Go to balance tab It should have no errors

jauggy commented 1 month ago

@geekingfrog have updated the unit test to use the db instead of mocks. But if I try and run it multiple times it will fail. try

mix test path/to/balance_lib_internal_test.exs

Try running this multiple times and it should fail. I'm not sure how to fix. You can see example below

https://github.com/beyond-all-reason/teiserver/assets/1305569/2fe37e97-9d97-4ac5-9f3f-3d16b2fb009c

StanczakDominik commented 1 month ago

I've applied the mix format stuff from master :)

jauggy commented 1 month ago

Have added https://github.com/beyond-all-reason/teiserver/issues/317 so that someone can fix the tests not clearing. I couldn't figure it out.