adds unit test for passing a string as the pattern