233a986111
Bringing in https://github.com/reprah/grape-route-helpers/pull/21 as a monkey patch since the grape-route-helpers project seems to be abandoned
14 lines
458 B
Ruby
14 lines
458 B
Ruby
require 'spec_helper'
|
|
require_relative '../../config/initializers/grape_route_helpers_fix'
|
|
|
|
describe 'route shadowing' do
|
|
include GrapeRouteHelpers::NamedRouteMatcher
|
|
|
|
it 'does not occur' do
|
|
path = api_v4_projects_merge_requests_path(id: 1)
|
|
expect(path).to eq('/api/v4/projects/1/merge_requests')
|
|
|
|
path = api_v4_projects_merge_requests_path(id: 1, merge_request_iid: 3)
|
|
expect(path).to eq('/api/v4/projects/1/merge_requests/3')
|
|
end
|
|
end
|