[Seaside-dev] Issue 296 in seaside: WAFileHandler default is nil when running tests

codesite-noreply at google.com codesite-noreply at google.com
Thu Jan 22 19:03:29 UTC 2009


Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 296 by WeybridgeWay: WAFileHandler default is nil when running  
tests
http://code.google.com/p/seaside/issues/detail?id=296

In a fresh Squeak image load the following:
* Seaside-Platform-jf.37
* Seaside-Squeak-Platform-lr.42
* Seaside-Squeak-Continuation-lr.14
* Seaside-Tests-Platform-lr.37
* Seaside-Tests-Squeak-Platform-pmm.14
* Seaside-Core-jgf.410
* Seaside-Squeak-Core-lr.43
* Seaside-Tests-Core-jgf.53
* Seaside-Tests-Squeak-Core-lr.11
(Note that these are not the most recent because the most recent will not  
load in a clean image.)

WAFileLibraryTest>>#testUrlOf fails because WAFileHandler default is nil.  
Should loading the packages cause
this to be defined? Should the test setup make sure it is defined?

Also, WAFileLibraryTest>>#testSamplePng could/should be refactored to avoid  
reference to internals of the
response:

testSamplePng
	| handler library response stream contents |
	handler := WAFileHandler named: '/i/dont/care/'.
	library := WATestingFiles default.
	self requestContextWithUrl: '/i/dont/care/WATestingFiles/sample.png'.
	response := self responseAfter: [ handler handle: self requestContext ].
	self assert: response status = 200.
	self assert: response contentType = WAMimeType imagePng.
	stream := WriteStream on: String new.
	response writeContentOn: stream.
	contents := stream contents.
	self assert: contents asByteArray = library samplePng.  "Is there a reason  
this was using a #perform:?"

--James Foster

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings


More information about the seaside-dev mailing list