Plan B

If I took plan B a little while after I had unprotected sex when should I take my pregnancy test just to be sure? And will I be okay if I took plan B?