Add tests for #12209

I'd like @s0undt3ch to sign off on this before merging (see [here](https://github.com/saltstack/salt/pull/12281#issuecomment-41357661)).