Comments (6)
I found this when playing around with ring-spec - which is great btw. Is ring-mock deprecated now or does it just need a fix? Happy to send a PR.
from ring-mock.
Also, :query-string is generated as nil, which fails the spec.
(s/explain-str :ring/request (assoc (request :get "/") :protocol "HTTP/1.1"))
=>
In: [:query-string] val: nil fails spec: :ring.request/query-string at: [:query-string] predicate: :clojure.spec/unknown
from ring-mock.
Needs a fix, I think! Ring-Mock is still useful for creating non-generative request maps. The :query-string
key should probably be missing if it's not set.
from ring-mock.
I don't know how you feel about the ring-mock project now, given that equivalent functionality could eventually form part of the ring-spec project (via generators). Personally, I like ring-mock and think it's worth keeping up-to-date. Feel free to delegate to me if you like, but I think the fixes are fairly trivial.
from ring-mock.
As far as I know, generators aren't designed for creating specific data structures, so Ring-Mock is still useful for creating non-generative request maps.
from ring-mock.
This should be fixed now that #12 has been merged.
from ring-mock.
Related Issues (13)
- Default port should be 443 when scheme is :https
- Old Clojure dependency means you can't open a REPL with current release of CIDER HOT 5
- ring-mock 0.3.0 drops DELETE body HOT 2
- What's the right way to simulate file upload HOT 8
- No license file HOT 4
- Would you mind cutting a release? HOT 2
- Link "view source" in api documentation is broken
- What is `json-body` HOT 5
- post form-params bug HOT 1
- New release? HOT 1
- Support mocking websocket requests? HOT 1
- Add support for mocking multipart uploads
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ring-mock.