Does GI or internist do tests for cirrhosis of the liver?

Both; Gi can biopsy. Either can do the history, physical, appropriate blood tests, and order supporting imaging studies, like sonograms. Gi docs are trained to do liver biopsies (so can interventional radiologists, but they generally get smaller bits of tissue) when needed to diagnose and stage the disease.
Both. If clinical presentation is indicated, either of them can order the tests.