Skip to content
This repository was archived by the owner on Nov 8, 2024. It is now read-only.

Commit 568bc81

Browse files
author
Paulo Silva
committed
unit tests implementation
1 parent f68d006 commit 568bc81

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/unit/parser-test.coffee

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,19 @@ describe "parser module", () ->
175175
before () ->
176176
output = parser.parseResponse(responseString)
177177

178-
['statusCode', 'statusMessage', 'headers', 'body'].forEach (key) ->
178+
['protocolVersion', 'statusCode', 'statusMessage', 'headers', 'body'].forEach (key) ->
179179
it 'should have key "'+ key + '"', () ->
180180
assert.include Object.keys(output), key
181181

182+
describe "protocolVersion", () ->
183+
subject = ""
184+
185+
before () ->
186+
subject = output['protocolVersion']
187+
188+
it 'should contain "HTTP/1.1"', () ->
189+
assert.equal subject, "HTTP/1.1"
190+
182191
describe "statusCode", () ->
183192
subject = ""
184193

0 commit comments

Comments
 (0)