I am writing an app that mainly consists of just creating, editing and reading records in database. I was persuaded that any app has to be covered with tests. I was told that it's a good practice to mock DB out of tests.
However in my app if I remove both HTTP and DB then there is almost nothing left. Data validation is inside models which cannot operate without db, at least not in my ORM. All that my functions do is operating on these models.
How am I going to test it? Maybe I should test at all?
Update: In the beginning I just wanted to write tests with db using Node.js and Sequelize. I had an issue with this approach. The issue is already asked about on SO here: https://stackoverflow.com/questions/49349326/seed-db-with-sequelize-seed-files-before-running-tests-with/52218311#52218311
The only answer suggests that I "shouldn't make real DB requests". So I decided to make a separate question about weather I really shouldn't or maybe I actually should.