-
Notifications
You must be signed in to change notification settings - Fork 26
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
SJ - Fixing indirect cost validation [#152641470] #1184
Conversation
@Stuart-Johnson Looks good, but I think you can git checkout those db/schema.rb changes. |
spec/models/protocol/valid?_spec.rb
Outdated
@@ -38,6 +38,8 @@ | |||
end | |||
end | |||
|
|||
it { is_expected.to validate_numericality_of(:indirect_cost_rate).is_greater_than_or_equal_to(1) } | |||
it { is_expected.to validate_numericality_of(:indirect_cost_rate).is_less_than_or_equal_to(1000) } | |||
if Setting.find_by_key('use_indirect_cost').value |
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.
After discussing with @Stuart-Johnson, we should not use an if
condition here, but instead a before :each do
block where use_indirect_cost
is turned on.
before :each do
stub_config("use_indirect_cost", true)
end
Like @wtholt said and after discussing with @Stuart-Johnson, it seems like the schema changes should be checked out, though we may want to consider the effect of the inconsistent collation in the schema file. Is it a big deal or does it need to be updated? Schema does update itself automatically,but it only updates the information for specific tables being changed in migrations, so because a lot of older tables have not be changed in a while, the collation may be out-of-date. |
https://www.pivotaltracker.com/story/show/152641470