[Finishes #50607273] - added specs to cover the cases from GitHub issue #371