summaryrefslogtreecommitdiff
path: root/spec/helpers/services_helper_spec.rb
diff options
context:
space:
mode:
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