The only way to accurately test if an animal has rabies is to examine its brain after death. However, if the dog has been vaccinated against rabies, the owner should have proof of that vaccination through a certificate and a tag that should be affixed to its collar. Not all animals wear collars, not all dog owners place the dog’s rabies tag on the collar, and not all dogs have owners, which can make learning information about the dog who bit you that much more complicated.
If you know the animal who bit you, you can ask the owner. However, not all dog owners are honest about such things, particularly since they’re legally required to have their dog vaccinated if it is over four months old. In some cases, the dog will be impounded and observed for signs of the disease. If the dog does not show signs of rabies, it probably does not have the disease.