liberator

2016-07-27T16:38:10.000002Z

I have a liberator resource that currently coerces a returned record of type #Foo{} into the appropriate serialisation... (using the liberator representation stuff)... However I'd like to unit test the resource, and not have to parse the byte-stream back to check the value that comes out is what's returned... i.e. I'd really like to do something like: (is (instance Foo (liberator-resource request))) What's the best way to do that?

2016-07-27T16:52:35.000003Z

could just test the functions that liberator calls of course...

ordnungswidrig 2016-07-27T17:21:45.000004Z

When you use maps as args to resource to define the handlers then you can override :as-response to return the record literally.