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

Add a function to assert headers #42

Open
iamjarvo opened this issue Nov 24, 2015 · 3 comments
Open

Add a function to assert headers #42

iamjarvo opened this issue Nov 24, 2015 · 3 comments

Comments

@iamjarvo
Copy link

No description provided.

@brjann
Copy link

brjann commented Aug 3, 2017

I too would appreciate this functionality.

@glenjamin
Copy link
Collaborator

I'd take a PR for this if it isn't already part of peridot

@danielcompton
Copy link
Collaborator

danielcompton commented Sep 13, 2021

I think this is correct, though I haven't done a super deep dive on it. Here for anyone who wants it, eventually I'll add this to kerodon, or someone else can make a PR?

(defmacro header? [header-name expected]
  `(ktest/validate =
                   (comp #(ring.util.response/get-header % ~header-name) :response)
                   ~expected
                   (~'header? ~header-name ~expected)))

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

No branches or pull requests

4 participants