Where are you intending to buy this from, a person or a business?
What you want to do FIRST is get a list of specs that details what the machine includes.
Model numbers for CPU, motherboard, power supply, memory, storage devices and graphics card (Well, we know what this one is anyhow) are typically going to determine if a thing is going to be good enough for a particular use or not.
As far as actually TESTING it, it's unlikely they are going to let you run things like Prime95, Furmark, Memtest86, etc. so as with buying ANY used computer hardware, it's a roll of the dice. Get the details and we can go from there.