Skip to content

Commit

Permalink
add spec for mount a prefixed API
Browse files Browse the repository at this point in the history
  • Loading branch information
yesmeck committed Dec 26, 2014
1 parent 03b75c8 commit 7f542aa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/grape/api_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2430,6 +2430,22 @@ class User < Grape::API
get '/v1/users/hello'
expect(last_response.body).to eq('hello users')
end

it 'mounts a prefixed API with nested resources' do
class User < Grape::API
prefix "api"
resource :users do
get :hello do
'hello users'
end
end
end
subject.mount User

get '/api/users/hello'
expect(last_response.body).to eq('hello users')
end

end
end

Expand Down

0 comments on commit 7f542aa

Please sign in to comment.