convert test to table-driven to be more idiomatic
Created by: ijt
This is to make the test structure less surprising in response to https://github.com/sourcegraph/sourcegraph/pull/5062#discussion_r310186636.
Test plan: This is just a test refactoring.