Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[VI-1056] updates factory & adds attribute validations #20815

Closed
wants to merge 1 commit into from

Conversation

bramleyjl
Copy link
Contributor

@bramleyjl bramleyjl commented Feb 17, 2025

Summary

  • Updates UserActionEvent class to validate event_id & event_type as not null

Related issue(s)

Testing done

  • New code is covered by unit tests
  • manually create UserActionEvent instances to test the attribute validations
 => UserActionEvent(id: integer, details: string, created_at: datetime, updated_at: datetime, event_id: string, event_type: integer) 
3.3.6 :002 > UserActionEvent.new(details: 'test details', event_id: 'some-event-id', event_type: 2).valid?
 => true 
3.3.6 :003 > UserActionEvent.new(details: 'test details', event_id: 'some-event-id', event_type: nil).valid?
 => false 
3.3.6 :004 > UserActionEvent.new(details: 'test details', event_type: 2).valid?
 => false

@va-vfs-bot va-vfs-bot temporarily deployed to VI-1056_user_action_event_attr_validations/main/main February 17, 2025 20:39 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to VI-1056_user_action_event_attr_validations/main/main February 17, 2025 20:41 Inactive
@bramleyjl bramleyjl marked this pull request as ready for review February 17, 2025 22:07
@bramleyjl bramleyjl requested a review from a team as a code owner February 17, 2025 22:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants