diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-15 06:10:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-01-15 06:10:42 +0000 |
commit | d35857c09311de5482f1a888f2d30a0cddd376ef (patch) | |
tree | b2ecf9be13f49971be3e0f348839f2b53443039c /spec | |
parent | c9bdf919932b7285ef9920bdac955459340da8fe (diff) | |
download | gitlab-ce-d35857c09311de5482f1a888f2d30a0cddd376ef.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/services_helper_spec.rb | 50 |
1 files changed, 7 insertions, 43 deletions
diff --git a/spec/helpers/services_helper_spec.rb b/spec/helpers/services_helper_spec.rb index 650642f8982..534f33d9b5a 100644 --- a/spec/helpers/services_helper_spec.rb +++ b/spec/helpers/services_helper_spec.rb @@ -25,6 +25,10 @@ RSpec.describe ServicesHelper do :integration_level ) end + + specify do + expect(subject[:reset_path]).to eq(helper.scoped_reset_integration_path(integration)) + end end end @@ -47,52 +51,12 @@ RSpec.describe ServicesHelper do is_expected.to eq(reset_group_settings_integration_path(group, integration)) end end - end - - describe '#reset_integration?' do - let(:group) { nil } - - subject { helper.reset_integration?(integration, group: group) } - - context 'when integration is existing record' do - let_it_be(:integration) { create(:jira_service) } - - context 'when `reset_integrations` is not enabled' do - it 'returns false' do - stub_feature_flags(reset_integrations: false) - - is_expected.to eq(false) - end - end - context 'when `reset_integrations` is enabled' do - it 'returns true' do - stub_feature_flags(reset_integrations: true) - - is_expected.to eq(true) - end - end - - context 'when `reset_integrations` is enabled for a group' do - let(:group) { build_stubbed(:group) } - - it 'returns true' do - stub_feature_flags(reset_integrations: group) - - is_expected.to eq(true) - end - end - end - - context 'when integration is a new record' do + context 'when a new integration is not persisted' do let_it_be(:integration) { build(:jira_service) } - context 'when `reset_integrations` is enabled' do - it 'returns false' do - stub_feature_flags(reset_integrations: true) - - is_expected.to eq(false) - end + it 'returns an empty string' do + is_expected.to eq('') end end end |