Assertions for response results captured by Fluffy.Event.response/3.
Pass the capture key as the first argument and execute the returned assertion
with Fluffy.expect/2. Capture waits for the event; assertions inspect its
retained result. Options follow Fluffy.Expect.
Summary
Assertions
Expects the captured response headers to include every supplied key/value pair. Additional headers are allowed.
Expects the captured response's page to equal the supplied value.
Expects the HTTP method of the request that produced this response.
Expects the associated request payload to equal the supplied string. This does not inspect the response body.
Expects the captured response's resource type to equal the supplied value.
Expects the captured response's status to equal the supplied value.
Expects the captured response's status text to equal the supplied value.
Expects the captured response URL to match a string, regex, or structured components.
Assertions
@spec to_have_headers(term(), map(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured response headers to include every supplied key/value pair. Additional headers are allowed.
@spec to_have_page(term(), term(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured response's page to equal the supplied value.
@spec to_have_request_method(term(), String.t(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the HTTP method of the request that produced this response.
@spec to_have_request_post_data(term(), String.t(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the associated request payload to equal the supplied string. This does not inspect the response body.
@spec to_have_resource_type(term(), String.t(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured response's resource type to equal the supplied value.
@spec to_have_status(term(), integer(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured response's status to equal the supplied value.
@spec to_have_status_text(term(), String.t(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured response's status text to equal the supplied value.
@spec to_have_url(term(), Fluffy.Page.url_expectation(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured response URL to match a string, regex, or structured components.
Strings match exactly and regexes match against the complete captured URL.
Relative strings are not resolved. Structured keywords use the same path,
query, and fragment rules as Fluffy.Page.to_have_url/2.