gitlab-org--gitlab-foss/spec/initializers/grape_route_helpers_fix_spec.rb
Mario de la Ossa 233a986111
Fix grape-route-helper route shadowing
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
2018-01-29 15:28:14 -06:00

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