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

improve invalid factorybot linter, some specs #5570

Merged
merged 4 commits into from
Apr 14, 2024
Merged

improve invalid factorybot linter, some specs #5570

merged 4 commits into from
Apr 14, 2024

Conversation

compwron
Copy link
Collaborator

factorybot linting

@github-actions github-actions bot added ruby Pull requests that update Ruby code Tests! 🎉💖👏 labels Mar 12, 2024
@compwron compwron marked this pull request as ready for review March 27, 2024 03:59
@compwron compwron changed the title Lint improve invalid factorybot linter, some specs Apr 14, 2024
@@ -58,7 +58,6 @@
end

trait :expenses_status do
casa_case { nil }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was invalid and seemed bad so I removed it

@@ -5,7 +5,8 @@

trait :with_casa_cases do
after(:create) do |user, _|
create_list(:case_assignment, 2, volunteer: user)
volunteer = create(:volunteer)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the user in this case is I believe the supervisor. The cases should not be assigned to the supervisor.

@@ -12,7 +12,7 @@
token { "verysecuretoken" }

trait :inactive do
volunteer
type { "Volunteer" }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this previous way was simply not working I think

@@ -109,17 +109,23 @@
end

it "requires duration minutes" do
expect(build_stubbed(:case_contact, :details_status, duration_minutes: nil)).not_to be_valid
obj = build_stubbed(:case_contact, :details_status, duration_minutes: nil)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

better testing of errors - I'd like more good testing of errors

@compwron compwron merged commit a3bb5b5 into main Apr 14, 2024
11 of 13 checks passed
@compwron compwron deleted the lint branch April 14, 2024 19:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant