(#2798) - add some attachment tests

I haven't been able to repro #2798 yet, but at least I'm writing some new tests. I figure the more tests, the better, so we might as well merge them.