Commit d4bfc024 authored by Etienne Baqué's avatar Etienne Baqué

Returning more accurate value in AuditDetails when a custom message is provided

parent 9de0692a
......@@ -33,7 +33,7 @@ module Audit
when :failed_login
"Failed to login with #{oath_label} authentication"
when :custom_message
target_detail_value
detail_value
else
text_for_change(target_detail_value)
end
......
......@@ -39,18 +39,6 @@ describe AuditEventsHelper do
is_expected.to eq(custom_message)
end
end
context 'when the target_type is not Operations::FeatureFlag' do
let(:target_type) { 'User' }
context 'when custom message contains "_"' do
let(:custom_message) { "message_with_spaces" }
it 'replaces them with spaces' do
expect(subject).to eq("message with spaces")
end
end
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