Skip to content

Commit

Permalink
Issue #58: replace GemServerRegistry ref with ref to GemServer
Browse files Browse the repository at this point in the history
  • Loading branch information
dalehenrich committed Jan 6, 2015
1 parent 62385cf commit 6f6f220
Show file tree
Hide file tree
Showing 19 changed files with 19 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ testDownloadSmallHTML
oldFileNamed: 'small.html'
do: [ :stream | self assert: (stream upToEnd includesSubstring: 'Small') ].
client close.
ZnFileSystemUtils deleteIfExists: 'small.html'.
ZnFileSystemUtils deleteIfExists: 'small.html'.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ testGetSmallHTMLTwice
self assert: client isSuccess.
self assert: client response contentType = ZnMimeType textHtml.
self assert: (client contents includesSubstring: 'Small').
client close.
client close.
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ testMultiPartFormDataWriteRead
output := (ZnMultiPartFormDataEntity type: input contentType length: input contentLength) readFrom: bytes readStream.
self assert: (output partNamed: 'extra') fieldValueString = 'my-extra'.
self assert: (output partNamed: 'info') fieldValueString = 'my-info'.
self assert: (output partNamed: 'file') contents = 'Zinc HTTP Components'.
self assert: (output partNamed: 'file') contents = 'Zinc HTTP Components'.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Running
tearDown
super tearDown.
GemServerRegistry removeGemServerNamed: self gemServerName
GemServer removeGemServerNamed: self gemServerName
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"shouldInheritSelectors" : "dkh 12/14/2014 07:21" },
"instance" : {
"expectedFailures" : "dkh 12/14/2014 10:35",
"tearDown" : "dkh 12/14/2014 09:37",
"tearDown" : "dkh 01/06/2015 13:44",
"testDefault" : "dkh 12/14/2014 07:11",
"testLocalUrl" : "dkh 12/14/2014 10:00",
"testSessionExpired" : "dkh 12/14/2014 08:03",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ testMergeValued
headers := ZnHeaders new.
headers at: 'Set-Cookie' put: 'foo=1'.
headers at: 'Set-Cookie' put: 'bar=1' ifPresentMerge: [ :old :new | old, ';', new ].
self assert: (headers at: 'Set-Cookie') equals: 'foo=1;bar=1'


self assert: (headers at: 'Set-Cookie') equals: 'foo=1;bar=1'
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ testMultiValued
headers := ZnHeaders new.
headers at: 'Set-Cookie' put: 'foo=1'.
headers at: 'Set-Cookie' add: 'bar=1'.
self assert: (headers at: 'Set-Cookie') equals: #('foo=1' 'bar=1')


self assert: (headers at: 'Set-Cookie') equals: #('foo=1' 'bar=1')
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ testMultiValuedStreaming
keysAndValues := OrderedCollection streamContents: [ : stream |
headers headersDo: [ :key :value |
stream nextPut: key; nextPut: value ] ].
self assert: keysAndValues equals: #('Set-Cookie' 'foo=1' 'Set-Cookie' 'bar=1') asOrderedCollection


self assert: keysAndValues equals: #('Set-Cookie' 'foo=1' 'Set-Cookie' 'bar=1') asOrderedCollection
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ testNormalization
self assert: (headers includesKey: 'content-TYPE').
self assert: (headers at: 'Content-Type') equals: 'text/plain'.
headers at: 'CONTENT-type' put: 'text/html'.
self assert: (headers at: 'Content-Type') equals: 'text/html'.


self assert: (headers at: 'Content-Type') equals: 'text/html'.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ testRequests
self assert: (bench message isKindOf: ZnRequest).
bench writeRepresentation.
self assert: (bench read isKindOf: ZnRequest).
self assert: bench read equals: bench message ]


self assert: bench read equals: bench message ]
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@ testResponses
self assert: (bench message isKindOf: ZnResponse).
bench writeRepresentation.
self assert: (bench read isKindOf: ZnResponse).
self assert: bench read equals: bench message ]


self assert: bench read equals: bench message ]
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ testReadingWithEntity
self assert: (request contentType matches: ZnMimeType textPlain).
self assert: request contentLength equals: 8.
self assert: request hasHeaders.
self assert: request entity contents equals: '12345678'
self assert: request entity contents equals: '12345678'
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ testAbsoluteRedirect
self assert: response hasHeaders.
self assert: (response headers at: 'Location') = uri.
self assert: response hasEntity.
self assert: (response entity contents includesSubstring: uri)
self assert: (response entity contents includesSubstring: uri)
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,4 @@ testCookie

responseString := String streamContents: [ :stream | response writeOn: stream ].

self assert: (responseString includesSubstring: 'Set-Cookie: testCookie1=123')




self assert: (responseString includesSubstring: 'Set-Cookie: testCookie1=123')
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,4 @@ testCookies
responseString := String streamContents: [ :stream | response writeOn: stream ].

self assert: (responseString includesSubstring: 'Set-Cookie: testCookie1=123').
self assert: (responseString includesSubstring: 'Set-Cookie: testCookie2=321').




self assert: (responseString includesSubstring: 'Set-Cookie: testCookie2=321').
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ testSlashdotGzipChunked
self assert: (response headers at: 'Content-Encoding' ifAbsent: [ 'gzip' ]) = 'gzip'.
self assert: (response headers at: 'Transfer-Encoding' ifAbsent: [ 'chunked' ]) = 'chunked'.
contents := response entity contents.
self assert: ((contents includesSubstring: 'Slashdot') or: [ contents includesSubstring: 'refresh' ])
self assert: ((contents includesSubstring: 'Slashdot') or: [ contents includesSubstring: 'refresh' ])
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ testSession
self assert: client isSuccess.
self assert: client session cookieJar cookies size = 1.
self assert: client session cookieJar cookies anyOne value equals: sessionId.
self assert: (client contents includesSubstring: sessionId) ]
self assert: (client contents includesSubstring: sessionId) ]
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ testSessionExpired
client get.
self assert: client isSuccess.
self assert: client session cookieJar cookies size = 1.
self deny: client session cookieJar cookies anyOne value = sessionId ]
self deny: client session cookieJar cookies anyOne value = sessionId ]
2 changes: 1 addition & 1 deletion repository/Zinc-Tests.package/monticello.meta/version

Large diffs are not rendered by default.

0 comments on commit 6f6f220

Please sign in to comment.