moved tests to general spec file to make DRY