diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2018-05-30 17:09:38 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2018-05-30 17:09:38 +0300 |
commit | 2c977029feb756955235f16a06e46d20adb1f557 (patch) | |
tree | 7c7990bfcb52969eb35ee88ac8ccf456d151a0ca /spec | |
parent | c53da5e9197df5fa9712fdee679da7f1b3c3224c (diff) | |
parent | 990af4fb5dcc08894578cc7d1dd24176c1cbcef2 (diff) |
Merge branch 'sh-use-grape-path-helpers' into 'master'
Replace grape-route-helpers with our own grape-path-helpers
Closes #45718
See merge request gitlab-org/gitlab-ce!19240
Diffstat (limited to 'spec')
-rw-r--r-- | spec/initializers/grape_route_helpers_fix_spec.rb | 14 | ||||
-rw-r--r-- | spec/requests/api/merge_requests_spec.rb | 12 |
2 files changed, 12 insertions, 14 deletions
diff --git a/spec/initializers/grape_route_helpers_fix_spec.rb b/spec/initializers/grape_route_helpers_fix_spec.rb deleted file mode 100644 index 2cf5924128f..00000000000 --- a/spec/initializers/grape_route_helpers_fix_spec.rb +++ /dev/null @@ -1,14 +0,0 @@ -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 diff --git a/spec/requests/api/merge_requests_spec.rb b/spec/requests/api/merge_requests_spec.rb index 6b91e48ae6a..8b168816d6c 100644 --- a/spec/requests/api/merge_requests_spec.rb +++ b/spec/requests/api/merge_requests_spec.rb @@ -29,6 +29,18 @@ describe API::MergeRequests do project.add_reporter(user) end + describe 'route shadowing' do + include GrapePathHelpers::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 + describe 'GET /merge_requests' do context 'when unauthenticated' do it 'returns an array of all merge requests' do |