When to test?

How long after having unprotected sex should I take a pregnancy test ?

I can't use my period as a clue because I haven't really had one since 2014 because I was on birth control. Got that taken out in March and still no period so...yeah.