-
-
Notifications
You must be signed in to change notification settings - Fork 484
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
Conversation
@@ -58,7 +58,6 @@ | |||
end | |||
|
|||
trait :expenses_status do | |||
casa_case { nil } |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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" } |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
factorybot linting