Remove unnecessary variables in detect spec test
Merge pull request #2893 from guardian/remove-unnecessary-vars-in-test

Remove unnecessary variables in detect spec test