add a when scope test case