Let's refactor a test: Remove duplicated emails

from blog Just Some Code, | ↗ original
This post is part of my Advent of Code 2022. Recently, I’ve been reviewing pull requests as one of my main activities. This time, let’s refactor two tests I found on one code review session. The two tests check if an email doesn’t have duplicated addresses before sending it. But, they have a common mistake: testing private methods directly. Let’s...