functional test for scope injection