summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpereira2 <rpereira@gitlab.com>2019-01-09 00:46:14 +0530
committerrpereira2 <rpereira@gitlab.com>2019-01-09 12:25:57 +0530
commit9ea373f9b3504bf8ecfc66ae022f4bd6e3eabb27 (patch)
treeef847e2ba9c2477be92a3c6e2acdf2ddf8d861b9
parent42d4213cb68bda09ae22bb951098f0d22b3d0c35 (diff)
downloadgitlab-ce-55178-sentry-issues-service.tar.gz
Fix failing operations/update_service_spec55178-sentry-issues-service
- Fix specs failing due to new validation. - Also remove a method definition that was repeated.
-rw-r--r--lib/sentry/client.rb9
-rw-r--r--spec/services/projects/operations/update_service_spec.rb8
2 files changed, 4 insertions, 13 deletions
diff --git a/lib/sentry/client.rb b/lib/sentry/client.rb
index b3a29a5e423..9a93f3c3f6f 100644
--- a/lib/sentry/client.rb
+++ b/lib/sentry/client.rb
@@ -27,15 +27,6 @@ module Sentry
}
end
- def request_params
- {
- headers: {
- 'Authorization' => "Bearer #{@token}"
- },
- follow_redirects: false
- }
- end
-
def get_issues(issue_status:, limit:)
resp = Gitlab::HTTP.get(
issues_api_url,
diff --git a/spec/services/projects/operations/update_service_spec.rb b/spec/services/projects/operations/update_service_spec.rb
index 731be907453..6afae3da80c 100644
--- a/spec/services/projects/operations/update_service_spec.rb
+++ b/spec/services/projects/operations/update_service_spec.rb
@@ -17,7 +17,7 @@ describe Projects::Operations::UpdateService do
{
error_tracking_setting_attributes: {
enabled: false,
- api_url: 'http://url',
+ api_url: 'http://gitlab.com/api/0/projects/org/project',
token: 'token'
}
}
@@ -32,7 +32,7 @@ describe Projects::Operations::UpdateService do
project.reload
expect(project.error_tracking_setting).not_to be_enabled
- expect(project.error_tracking_setting.api_url).to eq('http://url')
+ expect(project.error_tracking_setting.api_url).to eq('http://gitlab.com/api/0/projects/org/project')
expect(project.error_tracking_setting.token).to eq('token')
end
end
@@ -42,7 +42,7 @@ describe Projects::Operations::UpdateService do
{
error_tracking_setting_attributes: {
enabled: true,
- api_url: 'http://url',
+ api_url: 'http://gitlab.com/api/0/projects/org/project',
token: 'token'
}
}
@@ -52,7 +52,7 @@ describe Projects::Operations::UpdateService do
expect(result[:status]).to eq(:success)
expect(project.error_tracking_setting).to be_enabled
- expect(project.error_tracking_setting.api_url).to eq('http://url')
+ expect(project.error_tracking_setting.api_url).to eq('http://gitlab.com/api/0/projects/org/project')
expect(project.error_tracking_setting.token).to eq('token')
end
end