Fingering is basically contact skin to skin, and that could expose you to syphilis and herpes, in the case the other person was affected by any of them. In both cases, you would have to touch the lesions those infections cause on skin to get infected. But honestly, I see really remote possibilities. If you touched your penis after fingering the other person, if there were rests of rectal fluids on your finger, you could have been exposed to gonorrhea and chlamydia as well. But one more time, the risk is remote, if not negligible.
If you are concerned, you can test as follows:
-Syphilis, 6 weeks after the exposure, and if your result is negative, repeat it 3 months after the encounter, as there are people that take longer to show a positive result.
-Gonorrhea and chlamydia, 3 weeks after the exposure.
-Herpes, 3 months after the encounter.
Rectal fluids are also a source of parasites like Giardia, which can lead you to have gastroenteritis in case that parasite reaches your digestive system. Be careful with those encounters.
All the best.