Add missing test from PyFITS

This is a unit test in PyFITS that for some reason was never merged over to Astropy.  I was going to fix this at one point because I found this buried in my git stash, but it was never completed for whatever reason.