Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check correctness of stripping and normalisation in cascaded asserts #56

Open
mabdi opened this issue May 5, 2020 · 1 comment
Open
Labels

Comments

@mabdi
Copy link
Owner

mabdi commented May 5, 2020

No description provided.

@mabdi mabdi added the TODO label May 5, 2020
@mabdi
Copy link
Owner Author

mabdi commented Jul 7, 2020

TODO.
check for this code:

testUrlFor
	| context request response session url |
	handler class == WARegistry "only WARegistry supports tracking generic request handlers"
		ifFalse: [ ^ self ].
	request := self requestWithMethod: 'GET'.
	request setCookies: (Array with: (WARequestCookie key: '_s' value: 'sessionid')).
	response := WABufferedResponse new.
	session := WASession new.
	
	context := WARequestContext request: request response: response.
	url := WACurrentRequestContext
		use: context
		during: [
			handler register: session.
			session url ].
	self assert: (url queryFields includesKey: '_s').
	request url addField: '_s' value: (url queryFields at: '_s').
		
	[  handler handle: context ]
		on: WAResponseNotification
		do: [ :notification | ].
		
	self assert: response status = 200.
	self assert: (response cookies isEmpty)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant