Time to test?

I had sex the week before my period started, will a test be accurate?

I had sex the 22nd of March (two weeks ago) and I was supposed to get my period sometime during the week of the 26th which was last week (I’m irregular since I’m on the birth control pill) but I just got spotting instead of a period. If I take a test tomorrow morning will it be a good time to test since my period was supposed to come last week? Thanks