I would consider it a test to see if he can handle assertiveness. That is, if he is fun and easy-going.
The above is correct but this part would depend a lot on how the "no" is delivered:
If he said no, I would think she could consider him either not interested in her enough to part with a few dollars (and too cheap to satisfy a small request), or insecure about his status in the company of a woman.
The real status test is about whether he considers his company to be as valuable as hers. If he complies with the request (without any quid pro quo), then he's ceded her the higher social status -- which was what the question was testing (either intentionally or unintentionally), in the common case.
Declining the request, reversing it (you buy me one), or insisting on a quid pro quo, are the only ways to maintain equivalent or higher status in the interaction (absent an ongoing equal relationship wherein the quid pro quo is assumptive). Also, skillfully handling any of these options raises the observer's estimate of your social coprocessor's power rating as well. ;-)
There are a wide variety of context-sensitive ways to decline or redirect such a request, depending on the situation and level of rapport of the conversation... from the polite to the downright rude, all of which can be functional if delivered with confidence. But certainly, "fun and easygoing" no's are possible.
(For example: pretending to misinterpret the request as an offer, eg. "Oh, yes please. That's very kind of you. I'll have a..", a playful, "Oh? And what are you going to do for me?", or even a humorous, mock-offended and effeminately-voiced, "Hmph! What kind of boy do you think I am? Are you trying to get me drunk and take advantage of me?")
As thomblake points out, "Surely You're Joking, Mr. Feynman"contains his story of finding out this counterintuitive fact - although the specific story involves calling a woman "worse than a whore" for getting him to buy $1.10 worth of sandwiches. She then proceeded to pay him back the $1.10... and then came over later to have sex with him.
In Feynman's second story, he asks “Listen, before I buy you a drink, I want to know one thing: Will you sleep with me tonight?” -- and gets a "yes".
Amusingly, the "Player Guide" (an open-source guide for beginning PUAs) isn't quite so bold - it only recommends asking for a french kiss as the quid pro quo. ;-)
Of course, all of these anecdotes and advice are subject to selection bias - i.e., to the mostly-NT women who show up at bars and ask men to buy them drinks. My guess is that most non-NT women don't ask guys to buy them drinks unless there's either an ongoing quid pro quo (i.e., "I'll buy the next round"), or they've consciously chosen to exploit the social dynamic for financial/alcoholic gain.
tl;dr: a man is generally best-off treating a request for a drink as a test to determine whether he has low enough self-esteem to believe he needs to pay for female company, and an opportunity to display an unruffled and socially-skillful response.
A woman asks a man for a drink at a bar.
The PUA theory explains this in terms of a status interaction. The woman is testing, 'is this man so low status he feels compelled or obligated to buy me a drink?'
I am wary of explanations based on status interactions. It is the kind of explanation that can explain anything and therefore nothing. Also, I am skeptical based on my sense of the woman's subsequent disappointment and embarrassment if the man says no directly -- this is not a test where the level 1 correct answer is 'no'.
Alternatively, there's the simplis...
Followup to: Do you have High-Functioning Asperger's Syndrome?
LW reader Madbadger uses the metaphor of a GPU and a CPU in a desktop system to think about people with Asperger's Syndrome: general intelligence is like a CPU, being universal but only mediocre at any particular task, whereas the "social coprocessor" brainware in a Neurotypical brain is like a GPU: highly specialized but great at what it does. Neurotypical people are like computers with measly Pentium IV processors, but expensive Radeon HD 4890 GPUs. A High-functioning AS person is an Intel Core i7 Extreme Edition - with on-board graphics!
This analogy also covers the spectrum view of social/empathic abilities, you can think about having a weaker social coprocessor than average if you have some of the tendencies of AS but not others. You can even think of your score on the AQ Test as being like the Tom's Hardware Rating of your Coprocessor. (Lower numbers are better!).
If you lack that powerful social coprocessor, what can you do? Well, you'll have to run your social interactions "in software", i.e. explicitly reason through the complex human social game that most people play without ever really understanding. There are several tricks that a High-functioning AS person can use in this situation: