Using atoms in this test is not ideal, but I couldn't think of a better way to test if the fn was called.