correct 1 typo in docstring

@embray

[skip ci]
Merge pull request #2899 from hamogu/patch-2

correct 1 typo in docstring
removing trailing whitespace from the new test
Merge branch 'master' of github.com:astropy/astropy