diff options
author | rpereira2 <rpereira@gitlab.com> | 2019-02-04 20:16:49 +0530 |
---|---|---|
committer | rpereira2 <rpereira@gitlab.com> | 2019-02-06 21:04:37 +0530 |
commit | 01bae1678d68a66f78e4c9c345ba565b40f4b021 (patch) | |
tree | b0807da2f725f9d5ea83425005f2b4596f1eb307 | |
parent | d809a0daa7a287169691594b5db23d3a90f6ce79 (diff) | |
download | gitlab-ce-01bae1678d68a66f78e4c9c345ba565b40f4b021.tar.gz |
Remove duplicate code that occurred after rebase
-rw-r--r-- | spec/models/error_tracking/project_error_tracking_setting_spec.rb | 49 |
1 files changed, 0 insertions, 49 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 dcecc4aa94f..d30228b863c 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( @@ -319,14 +280,4 @@ describe ErrorTracking::ProjectErrorTrackingSetting do end end end - - describe '#api_host' do - before do - subject.api_url = 'https://example.com/api/0/projects/org-slug/proj-slug/' - end - - it 'extracts the api_host from api_url' do - expect(subject.api_host).to eq('https://example.com/') - end - end end |