Commit 00cf510d authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch '277100-fix-endpoint-spec' into 'master'

Stop leaking Grape::Endpoint mocks for GitHub and BitBucket

Closes #227100

See merge request gitlab-org/gitlab!36150
parents 469f5956 6d9b56d2
...@@ -198,6 +198,10 @@ RSpec.describe API::ImportBitbucketServer do ...@@ -198,6 +198,10 @@ RSpec.describe API::ImportBitbucketServer do
end end
end end
after do
Grape::Endpoint.before_each nil
end
it 'raises a connection error' do it 'raises a connection error' do
post api("/import/bitbucket_server", user), params: { post api("/import/bitbucket_server", user), params: {
bitbucket_server_url: base_uri, bitbucket_server_url: base_uri,
......
...@@ -26,6 +26,10 @@ RSpec.describe API::ImportGithub do ...@@ -26,6 +26,10 @@ RSpec.describe API::ImportGithub do
end end
end end
after do
Grape::Endpoint.before_each nil
end
it 'rejects requests when Github Importer is disabled' do it 'rejects requests when Github Importer is disabled' do
stub_application_setting(import_sources: nil) stub_application_setting(import_sources: nil)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment