I'm a little curious.. First of all, if you're having to take drug tests, should you really be drinking 18 beers at one time? Not trying to be your mom or anything, just pointing something out.. Anyway, although krystald30 is right about your system taking an hour to detox your system from each beer, it has do with how fast you drank them and whether it was 16 hours after you finished your last beer or 16 hours after you started drinking.. The other thing is you used the term drug test. I assume you still mean breath test or other alcohol test, but just to let you know, if you're being piss tested, they usually don't test for alcohol at all. But if they are testing for it in a piss test, you need at least 24 hours after your last drink to come up clean. Even then, it'd be kinda iffy with that much beer.
Yes you should with no problem
It's 1 hour for each beer. So, you should be clean in 18 hours, not 16.