Pregnancy tests ?

How long should you wait after unprotected sex before taking a test ? I know your supposed to wait untill missed period but not been keeping track