Fix query to use array for collection
Add test for query function; Rename test.html to articles.html