The beta-2 transferrin test is used for detecting the presence of cerebrospinal fluid (CSF). It is particularly useful in the differential diagnosis of CSF otorrhea or CSF rhinorrhea.