Pregnancy Test

So my boyfriend and I did “our thang” a couple days ago and in the heat of the moment he “came” inside of me a little then he pulled out. I wanted to know how soon can I take a test? 2 weeks until my next period