So a gay friend touched his penis which you encouraged as a 'test'? You said it would turn you on, and I would assume your bf complied to turn YOU on not gay friend.
You have since asked your boyfriend is he is bi or gay, and he says no? But you don't believe him because of the sexual test YOU set and encouraged him to participate in?
Gay friend has asked just bf out for drinks? And you suspect bf is lying about being gay because he said yes to having drinks?
Firstly, testing a bf is immature and has now backfired on you - as tests usually do. Secondly, if gay friend was a friend before then asking him out for drinks is normal. It is immature and frankly nasty to use a gay friend as a tester of your bf. Gay friend has feelings and you basically used him.
However, if you suspect gay friend is now trying to start something sexual with your bf, (after YOU encouraged him to!) and your bf is being naive about the 'friendship', then your bf will set the record straight (no pun intended). Your bf has every right to have drinks with a friend, gay or not.
This is all consequences of you setting tests. They are never a good idea and borderline abusive. Does your bf know it was a test? Do you set other tests? Are you actually ready for a relationship?