Skip to content

Commit

Permalink
fix (HTTP::Spec): make tests useful
Browse files Browse the repository at this point in the history
Fixes #20, thanks @shootingfly for the bugreport
  • Loading branch information
vladfaust committed May 8, 2019
1 parent d51591b commit 3fed88b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/onyx/http/spec.cr
Expand Up @@ -82,19 +82,19 @@ module Onyx::HTTP

# Assert response *status_code*.
def assert(status_code : Int)
status_code.should eq status_code
self.status_code.should eq status_code
end

# Assert response *status_code* and *body*.
def assert(status_code : Int, body : String)
assert(status_code)
body.should eq body
self.body.should eq body
end

# Assert response *status_code*, *body* and *headers*.
def assert(status_code : Int, body : String, headers : Hash(String, String))
assert(status_code, body)
headers.should eq headers
self.headers.should eq headers
end

protected def initialize(@response)
Expand Down

0 comments on commit 3fed88b

Please sign in to comment.