Reduce differences in spec/support/shared_contexts/services_shared_context.rb

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
Rémy Coutable 2019-02-27 18:00:13 +01:00
parent 37b184b339
commit f5a4adf462
No known key found for this signature in database
GPG Key ID: 98DFFD1C0C62B70B
1 changed files with 8 additions and 0 deletions

View File

@ -26,6 +26,14 @@ Service.available_services_names.each do |service|
end
end
before do
if service == 'github' && respond_to?(:stub_licensed_features)
stub_licensed_features(github_project_service_integration: true)
project.clear_memoization(:disabled_services)
project.clear_memoization(:licensed_feature_available)
end
end
def initialize_service(service)
service_item = project.find_or_initialize_service(service)
service_item.properties = service_attrs