Thanks for the query.
You have not mentioned the date of your last menstrual period.
Probably it was two weeks ago, since you mention that you are due after two weeks.
Assuming that you have a regular 28 day cycle, having brownish discharge with mild cramps around midcycle is sometimes known as ovulatory spotting, or ovulatory pain ( Mittelschmerz
If you have been using the pill regularly, plus using a back up method like condom, even if the condom ruptures, the pill should still be protective against pregnancy
Rarely, other local causes in the cervix
might cause such mid cycle pain and spotting.
The pregnancy test will not be positive so early on, it is positive only after the missed period.
Please wait for a couple of weeks for your period, and if it is delayed, consult a gynecologist.
If these same symptoms recur again, have a thorough gynecological check up