Guys, I think I'm more or less finished on the first version of the test Snap API, we are supporting requests for each HTTP method, requests with file uploads, some assertion functions. More assert functions and modifiers should be added when needed. There are also some basic request modifiers, again, add more when needed as well (the lazy way) :-)
Here is the Snap.Internal.Test file that has both public and private functions: https://github.com/roman/snap-core/blob/testing/src/Snap/Internal/Test.hs The Snap.Test that will have the functions we want to export: https://github.com/roman/snap-core/blob/testing/src/Snap/Test.hs And the test done to this API on the Snap test folder: https://github.com/roman/snap-core/blob/testing/test/suite/Snap/Test/Tests.hs If you (all the Snap team) have any suggestions/questions regarding documentation, code style or pending functions that you think are really necessary, please let me know. Regards. Roman.- 2011/2/27 Gregory Collins <[email protected]> > 2011/2/26 Román González <[email protected]>: > > Hey Greg, > > Thanks for the feedback, just one more question (bellow) about reading > the > > files the tester is providing... > > >> > - Reading the contents of the files given by the developer on the Test > >> > API > >> > >> I'm not sure I follow you here: what specifically is the problem? > > > > I think I'm wondering where are we going to read the files, would we be > > requiring the tester to provide a full URI for the File location? > > get' "/my-upload" [] $ do > > addFile "photo" "/tmp/file.jpg" > > Or are we going to have like a SNAP_ROOT where all the paths will go > > get' "/my-upload" [] $ do > > addFile "photo" "tmp/file.jpg" -- this go to SNAP_ROOT/tmp/file.jpg > > I would say, for the testing interface, just supply them as bytestrings. > > G > -- > Gregory Collins <[email protected]> >
_______________________________________________ Snap mailing list [email protected] http://mailman-mail5.webfaction.com/listinfo/snap
