You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by Alex aka Sinm <si...@gmail.com> on 2013/02/06 06:25:30 UTC
Query server spec - empty headers
Hi all!
I'm implementing a query server now. Several tests in query_server_spec.rb won't pass while comparing results to empty or other way absent headers hash. It's easy to repair that but i wonder is there any reason to expect empty/absent headers in tests which are not about the headers at all?
Examples:
-- suppressing empty headers, but they are expected to be
query server normal case ddoc list should end after 2
Failure/Error: should == ["start", ["first chunk", "ok"], {"headers"=>{}}]
expected: ["start", ["first chunk", "ok"], {"headers"=>{}}]
got: ["start", ["first chunk", "ok"], {}] (using ==)
query server that exits raw list should exit if it gets a non-row in the middle
Failure/Error: should == ["start", ["first chunk", "ok"], {"headers"=>{}}]
expected: ["start", ["first chunk", "ok"], {"headers"=>{}}]
got: ["start", ["first chunk", "ok"], {}] (using ==)
-- passing empty headers, but they are not expected in other tests
query server normal case should not erase ddocs on reset
Failure/Error: ["resp", {"body" => "Best ever - Doc body"}]
expected: ["resp", {"body"=>"Best ever - Doc body"}]
got: ["resp", {"headers"=>{}, "body"=>"Best ever - Doc body"}] (using ==)
query server normal case show should show
Failure/Error: ["resp", {"body" => "Best ever - Doc body"}]
expected: ["resp", {"body"=>"Best ever - Doc body"}]
got: ["resp", {"headers"=>{}, "body"=>"Best ever - Doc body"}] (using ==)