     hashid: "ffffffffffffffffffffffffffffffff"
   api_key: "eu1-384fd8a73c7ff0859a5891f9f4083b1b9727f9c3"
   query: "iphone"
+  sort:
+    Object:
+      price: "asc"
+      title: "desc"
+      description: "asc"
+    Array: [("title": "asc"), ("description": "desc")]
+    String: "price"
 
 # Test doofinder
 describe 'doofinder', ->

        res.should.to.be.deep.equal response
        done()

    it 'options', ->
      a = 1


    it 'setSort', ->
      # Test for setSort. Can be setted object, array and string types.
      client = new doofinder.Client mock.request.hashid, mock.request.api_key

      # Test sort with array type
      # sort: [{price: 'asc'}, {brand: 'desc'}] -> sort[0][price]=asc&sort[1][brand]=desc
      client.setSort(mock.sort.Array)
      querystring = client.makeQueryString()
      querystring.should.be.equal 'hashid=ffffffffffffffffffffffffffffffff&sort%5B0%5D%5Btitle%5D=asc&sort%5B1%5D%5Bdescription%5D=desc'

      # Test sort with object type
      # sort: {price: 'asc'} -> sort[price]=asc
      client.setSort(mock.sort.Object)
      querystring = client.makeQueryString()
      querystring.should.be.equal 'hashid=ffffffffffffffffffffffffffffffff&sort%5Bprice%5D=asc&sort%5Btitle%5D=desc&sort%5Bdescription%5D=asc'

      # Test with string type
      # sort: price -> sort=price
      client.setSort(mock.sort.String)
      querystring = client.makeQueryString()
      querystring.should.be.equal 'hashid=ffffffffffffffffffffffffffffffff&sort=price'

