summaryrefslogtreecommitdiff
path: root/spec/helpers/services_helper_spec.rb
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
committerRobert Speicher <rspeicher@gmail.com>2021-01-20 13:34:23 -0600
commit6438df3a1e0fb944485cebf07976160184697d72 (patch)
tree00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /spec/helpers/services_helper_spec.rb
parent42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff)
downloadgitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'spec/helpers/services_helper_spec.rb')
-rw-r--r--spec/helpers/services_helper_spec.rb50
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