Skip to content

Commit d33ae1a

Browse files
author
Tim Vandecasteele
committed
Adapt spec to new mechanism of prefixed apis
1 parent ab6fc95 commit d33ae1a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/non_default_api_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def app; SimpleApiWithHiddenDocumentation end
182182

183183
context "overriding hiding the documentation paths in prefixed API" do
184184
before :all do
185-
class HideDocumentationPathMountedApi < Grape::API
185+
class HideDocumentationPathPrefixedMountedApi < Grape::API
186186
desc 'This gets something.'
187187
get '/something' do
188188
{ bla: 'something' }
@@ -191,16 +191,16 @@ class HideDocumentationPathMountedApi < Grape::API
191191

192192
class PrefixedApiWithHiddenDocumentation < Grape::API
193193
prefix "abc"
194-
mount HideDocumentationPathMountedApi
194+
mount HideDocumentationPathPrefixedMountedApi
195195
add_swagger_documentation :hide_documentation_path => true
196196
end
197197

198198
end
199199

200200
def app; PrefixedApiWithHiddenDocumentation end
201201

202-
it "it doesn't show the documentation path on /abc/swagger_doc/abc.json" do
203-
get '/abc/swagger_doc/abc.json'
202+
it "it doesn't show the documentation path on /abc/swagger_doc/something.json" do
203+
get '/abc/swagger_doc/something.json'
204204

205205
JSON.parse(last_response.body).should == {
206206
"apiVersion"=>"0.1",
@@ -241,8 +241,8 @@ class PrefixedAndVersionedApiWithHiddenDocumentation < Grape::API
241241

242242
def app; PrefixedAndVersionedApiWithHiddenDocumentation end
243243

244-
it "it doesn't show the documentation path on /abc/v1/swagger_doc/abc.json" do
245-
get '/abc/v20/swagger_doc/abc.json'
244+
it "it doesn't show the documentation path on /abc/v1/swagger_doc/something.json" do
245+
get '/abc/v20/swagger_doc/something.json'
246246

247247
JSON.parse(last_response.body).should == {
248248
"apiVersion"=>"v20",

0 commit comments

Comments
 (0)