   (deftest test-query-put-index-returns-correct-results
     (testing "querying an index returns the correct results"
       (let [_ (put-index! client idx)
-            actual (query-index client {:index "ExpensiveSweetAndSavouryProductsWithLowStockAndRunningOut"})
+            actual (query-index client {:index idx-name})
             results (sort-by :UnitsInStock (actual :results))
             doc-one (first (filter
                              (fn [i]

            [clj-ravendb.config :refer :all]))

(let [client (client ravendb-url ravendb-database {:ssl-insecure? true :oauth-url oauth-url :api-key api-key})
      idx {:index "ExpensiveSweetAndSavouryProductsWithLowStockAndRunningOut"
           :from :Products
           :where [[:> :PricePerUser 20] [:< :UnitsInStock 10] [:== :UnitsOnOrder 0] [:== :Category "categories/2"]]
           :select [:Name]}]

  
  (use-fixtures :each (fn [f]
                        (f)
                        (delete-index! client idx-name))))