Freaking out

My husband and I had unprotected sex 4 weeks post partum... it was very heat of the moment and I wasn’t thinking and now I’m freaking out because I do not want to be pregnant this soon!! I’m getting the iud at my 6 week appointment.. but will they make me wait to get it put in until I can take a pregnancy test?