Commit 866cab6d authored by huzaifaiftikhar1's avatar huzaifaiftikhar1 Committed by Thong Kuah

Improve audit events spec for group saml provider

parent 10b55756
......@@ -34,6 +34,19 @@ RSpec.shared_examples 'base SamlProvider service' do
.and change { group.saml_provider&.enabled? }.to(true)
.and change { group.saml_provider&.enforced_sso? }.to(true)
.and change { AuditEvent.count }.by(4)
audit_event_messages = [
%r{enabled changed([\w\s]*)to true},
%r{certificate_fingerprint changed([\w\W\s]*)to #{fingerprint}},
%r{sso_url changed([\w\W\s]*)to https:\/\/test},
%r{enforced_sso changed([\w\s]*)to true}
]
audit_events = AuditEvent.last(4)
audit_event_messages.each_with_index do |expected_message, index|
expect(audit_events[index].details[:custom_message]).to match(expected_message)
end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment