BritishYouthBandAssociation / OrgAdmin

Admin site for organisations
1 stars 0 forks source link

Tests #279

Open rugulous opened 1 year ago

rugulous commented 1 year ago

We should probably add some form of automated testing now that we have an action runner.

I think running them before each commit is too restrictive and it's the purpose of pull requests to ensure that only working code makes it live - so I think passing tests should be a prerequisite of merging PRs.

This issue is a discussion/suggestion ticket as this issue is so large - any agreed on tests should be done in separate issues!

rugulous commented 1 year ago

I think a good first step would actually be testing all the helper methods in Library.

The Helpers are all pure functions so are easy to test

We can hook the models up to a dummy database (created before first test, dropped after last test) and fill with dummy data so we know what the queries should be returning

matt-fidd commented 1 year ago

Seems fair enough to me

rugulous commented 1 year ago

Seeing as I've broken everything and touched e v e r y s i n g l e f i l e for this change I'm working on, I'm seeing the importance of these tests more and more >.<

I'm going to try and put a list of every action possible through the system here so that we can build tests based off them

DB/System stuff

"Core" stuff

Config

Users

Membership

Organisation

Events

Bulk Emailer