We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1bcbfb0 commit 6010d59Copy full SHA for 6010d59
spec/grape/validations/presence_spec.rb
@@ -6,7 +6,13 @@ module ValidationsSpec
6
module PresenceValidatorSpec
7
class API < Grape::API
8
default_format :json
9
-
+
10
+ resource :bacons do
11
+ get "/" do
12
+ "All the bacon"
13
+ end
14
15
16
params do
17
requires :id, :regexp => /^[0-9]+$/
18
end
@@ -27,6 +33,12 @@ class API < Grape::API
27
33
def app
28
34
ValidationsSpec::PresenceValidatorSpec::API
29
35
36
37
+ it "does not validate for any params" do
38
+ get("/bacons")
39
+ last_response.status.should == 200
40
+ last_response.body.should == "All the bacon"
41
30
42
31
43
it 'validates id' do
32
44
post('/')
0 commit comments