Assertions for request results captured by Fluffy.Event.request/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 request headers to include every supplied key/value pair. Additional headers are allowed.
Expects the captured request's method to equal the supplied value.
Expects the captured request's page to equal the supplied value.
Expects the captured request's post data to equal the supplied value.
Expects the captured request's resource type to equal the supplied value.
Expects the captured request 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 request headers to include every supplied key/value pair. Additional headers are allowed.
@spec to_have_method(term(), String.t(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured request's method to equal the supplied value.
@spec to_have_page(term(), term(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured request's page to equal the supplied value.
@spec to_have_post_data(term(), String.t(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured request's post data to equal the supplied value.
@spec to_have_resource_type(term(), String.t(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured request's resource type to equal the supplied value.
@spec to_have_url(term(), Fluffy.Page.url_expectation(), [Fluffy.Expect.option()]) :: Fluffy.Expect.t()
Expects the captured request 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.