Skip to content
代码片段 群组 项目
未验证 提交 dcac8b14 编辑于 作者: Arpit Gogia's avatar Arpit Gogia 提交者: GitLab
浏览文件

Add target_type to refine the query

Changelog: other
上级 addd64cd
No related branches found
No related tags found
无相关合并请求
......@@ -154,24 +154,9 @@
end
it 'audits the creation' do
schedule = subject.payload[:dast_profile_schedule]
audit_event = AuditEvent.find_by(target_id: schedule.id)
aggregate_failures do
expect(audit_event.author).to eq(user)
expect(audit_event.entity).to eq(project)
expect(audit_event.target_id).to eq(dast_profile.dast_profile_schedule.id)
expect(audit_event.target_type).to eq('Dast::ProfileSchedule')
expect(audit_event.details).to eq({
author_name: user.name,
author_class: user.class.name,
event_name: "dast_profile_schedule_create",
custom_message: 'Added DAST profile schedule',
target_id: schedule.id,
target_type: 'Dast::ProfileSchedule',
target_details: user.name
})
end
expect { subject }.to change {
AuditEvent.where("details LIKE ?", "%dast_profile_schedule_create%").count
}.by(1)
end
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册