Is it a good idea to buy a 7-year-old MTB?
Being the owner of a 2004 dirt jumper, and a 2007 full-suspension, I can say it's just fine. However, be prepared to solve problems...creatively. Certain things that are specific to the bike may not be available anymore, but there's usually an after-market part to fill the gap.

The main reason not to buy an older mountain bike is the difference in how it's made, what it's made of, and what it can ride.

How it's made: Newer carbon, and even alumninum, is much stronger and prepared in different ways.

What it's made of: New steel is generally lighter than old steel frames, this reflects both material and manufacturing changes. Some things like carbon and titanium have come down in price, but are still worth more even on older bikes.

What it can ride: The downhill of yesteryear isn't what it is today. 3" of travel back then was more than enough for some serious trail riding, but now that same style of riding might require 4", 5", or 6" of travel.

However, these are just general problems that can arise or should be taken into consideration. I've had zero trouble with my older bikes (although the full susser is pretty heavy and not the greatest to pedal!). So, I would recommend that test ride and then compare to what a new model would cost and make a decision. Good luck!