testJobAction

Calls middleware under test with given action and joins foreground job.