Wrote helper specs for queries controller