Pregnancy test

How long until you can take pregnancy test after sex? I'm on mini pill so don't have periods