Add tests for #381
Merge pull request #385 from romainneutron/fix-381

Add tests for #381