With the release of Rails 5.1, they included system tests. Which means we can test our JavaScript too in rails. I see rails guide explains a sample test 'creating article' in both ways via system test and via integration test.
Now the question is before Rails 5.1 i was writing complex test cases in integration tests. But now i have two options to write a test case. I can write test case like 'test: should create article' in integration test, but i can also write the same test case in system test.
So when should i choose system test to write a test case and when to choose integration tests ?
Aucun commentaire:
Enregistrer un commentaire