summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrpereira2 <rpereira@gitlab.com>2019-02-04 20:25:33 +0530
committerrpereira2 <rpereira@gitlab.com>2019-02-07 10:37:07 +0530
commitcffd30afa137bc378e59423b2a3f9e99d8dcf891 (patch)
treea91103cc1837f7461a20906525916725ab82e89f
parent125560795b15cbbcb62578e6c1bcbb4416adeb07 (diff)
downloadgitlab-ce-cffd30afa137bc378e59423b2a3f9e99d8dcf891.tar.gz
Remove duplicate code that occurred during rebase
-rw-r--r--spec/models/error_tracking/project_error_tracking_setting_spec.rb39
1 files changed, 0 insertions, 39 deletions
diff --git a/spec/models/error_tracking/project_error_tracking_setting_spec.rb b/spec/models/error_tracking/project_error_tracking_setting_spec.rb
index 78e8863f5de..dfcc78c79be 100644
--- a/spec/models/error_tracking/project_error_tracking_setting_spec.rb
+++ b/spec/models/error_tracking/project_error_tracking_setting_spec.rb
@@ -227,45 +227,6 @@ describe ErrorTracking::ProjectErrorTrackingSetting do
it_behaves_like 'name from api_url', :project_name, 'Project Slug'
end
- context 'names from api_url' do
- shared_examples_for 'name from api_url' do |name, titleized_slug|
- context 'name is present in DB' do
- it 'returns name from DB' do
- subject[name] = 'Sentry name'
- subject.api_url = 'http://gitlab.com/api/0/projects/org-slug/project-slug'
-
- expect(subject.public_send(name)).to eq('Sentry name')
- end
- end
-
- context 'name is null in DB' do
- it 'titleizes and returns slug from api_url' do
- subject[name] = nil
- subject.api_url = 'http://gitlab.com/api/0/projects/org-slug/project-slug'
-
- expect(subject.public_send(name)).to eq(titleized_slug)
- end
-
- it 'returns nil when api_url is incorrect' do
- subject[name] = nil
- subject.api_url = 'http://gitlab.com/api/0/projects/'
-
- expect(subject.public_send(name)).to be_nil
- end
-
- it 'returns nil when api_url is blank' do
- subject[name] = nil
- subject.api_url = nil
-
- expect(subject.public_send(name)).to be_nil
- end
- end
- end
-
- it_behaves_like 'name from api_url', :organization_name, 'Org Slug'
- it_behaves_like 'name from api_url', :project_name, 'Project Slug'
- end
-
describe '.build_api_url_from' do
it 'correctly builds api_url with slugs' do
api_url = described_class.build_api_url_from(