                     res.views.should.have.property 'even_num', @viewEven
                     done()
 
+            it "When I send a request to create a complex view (with array)", (done) ->
+                map = (doc) ->
+                    if (doc.num? && (doc.num % 2) is 0)
+                        emit ["test", doc.num, doc.num], doc
+                    return
+                @viewEven = {map:map.toString()}
+
+                client.put 'request/all/even_num_array/', @viewEven, \
+                        (error, response, body) =>
+                    response.statusCode.should.equal 200
+                    done()
+
     describe "Access to a view without option", ->
         describe "Access to a non existing view", ->
             before cleanRequest

                    @body = body
                    done()

            it "Then I should have 0 documents returned", ->
                @body.should.have.length 50


        describe "Delete all doc from a view : even_num", (done) ->

            it "Then I should have 0 documents returned", ->
                @body.should.have.length 0

            it "When I send a request to delete a doc from even_num with complex query", (done) ->
                client.put "request/all/even_num_array/destroy/", \
                            {startkey: ["test", 8], endkey: ["test", 8, {}]}, \
                            (err, response, body) ->
                    response.statusCode.should.equal 204
                    should.not.exist err
                    done()

            it "And I send a request to grab all docs from even_num", (done) ->
                client.post "request/all/even_num/", {}, \
                            (error, response, body) =>
