Skip to content

Commit

Permalink
Improve assertions in request_processor_spec.cr
Browse files Browse the repository at this point in the history
  • Loading branch information
waj committed Apr 22, 2020
1 parent 390f106 commit 24e6fa8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/std/http/server/request_processor_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ describe HTTP::Server::RequestProcessor do
input = IO::Memory.new("GET / HTTP/1.1\r\n\r\n")
output = IO::Memory.new
processor.process(input, output)
output.rewind.gets_to_end.should_not match(/Internal Server Error/)

client_response = HTTP::Client::Response.from_io(output.rewind)
client_response.status_code.should eq(200)
Expand All @@ -321,6 +320,9 @@ describe HTTP::Server::RequestProcessor do
input = IO::Memory.new("GET / HTTP/1.1\r\n\r\n")
output = IO::Memory.new
processor.process(input, output)
output.rewind.gets_to_end.should match(/world/)

client_response = HTTP::Client::Response.from_io(output.rewind)
client_response.status_code.should eq(200)
client_response.body.should eq("Hello world")
end
end

0 comments on commit 24e6fa8

Please sign in to comment.