diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-09 21:07:57 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-09 21:07:57 +0000 |
commit | 5aa96ff14229dba7e35f213354963febf3ad2833 (patch) | |
tree | 544f3233c05f7f1aa723ea9f13036f2f45d91745 /spec | |
parent | 7ebcead8cfd2edb810dd0cbda816b6cfbd170fe3 (diff) | |
download | gitlab-ce-5aa96ff14229dba7e35f213354963febf3ad2833.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
3 files changed, 36 insertions, 2 deletions
diff --git a/spec/frontend/vue_shared/components/gl_mentions_spec.js b/spec/frontend/vue_shared/components/gl_mentions_spec.js new file mode 100644 index 00000000000..32fc055a77d --- /dev/null +++ b/spec/frontend/vue_shared/components/gl_mentions_spec.js @@ -0,0 +1,34 @@ +import { shallowMount } from '@vue/test-utils'; +import Tribute from 'tributejs'; +import GlMentions from '~/vue_shared/components/gl_mentions.vue'; + +describe('GlMentions', () => { + let wrapper; + + describe('Tribute', () => { + const mentions = '/gitlab-org/gitlab-test/-/autocomplete_sources/members?type=Issue&type_id=1'; + + beforeEach(() => { + wrapper = shallowMount(GlMentions, { + propsData: { + dataSources: { + mentions, + }, + }, + slots: { + default: ['<input/>'], + }, + }); + }); + + it('is set to tribute instance variable', () => { + expect(wrapper.vm.tribute instanceof Tribute).toBe(true); + }); + + it('contains the slot input element', () => { + wrapper.find('input').setValue('@'); + + expect(wrapper.vm.tribute.current.element).toBe(wrapper.find('input').element); + }); + }); +}); diff --git a/spec/workers/namespaces/root_statistics_worker_spec.rb b/spec/workers/namespaces/root_statistics_worker_spec.rb index 6bbdfe03ceb..45e75c9b0da 100644 --- a/spec/workers/namespaces/root_statistics_worker_spec.rb +++ b/spec/workers/namespaces/root_statistics_worker_spec.rb @@ -42,7 +42,7 @@ describe Namespaces::RootStatisticsWorker, '#perform' do allow_any_instance_of(Namespace::AggregationSchedule) .to receive(:schedule_root_storage_statistics).and_return(nil) - expect(Gitlab::SidekiqLogger).to receive(:error).once + expect(Gitlab::ErrorTracking).to receive(:track_exception).once worker.perform(group.id) end diff --git a/spec/workers/namespaces/schedule_aggregation_worker_spec.rb b/spec/workers/namespaces/schedule_aggregation_worker_spec.rb index be722f451e0..a2ce9891b5f 100644 --- a/spec/workers/namespaces/schedule_aggregation_worker_spec.rb +++ b/spec/workers/namespaces/schedule_aggregation_worker_spec.rb @@ -48,7 +48,7 @@ describe Namespaces::ScheduleAggregationWorker, '#perform', :clean_gitlab_redis_ context 'when namespace does not exist' do it 'logs the error' do - expect(Gitlab::SidekiqLogger).to receive(:error).once + expect(Gitlab::ErrorTracking).to receive(:track_exception).once worker.perform(12345) end |