Query_spec test