-
Notifications
You must be signed in to change notification settings - Fork 982
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
Fixes #215: Parameters can be saved without a value #1610
Conversation
Other models (host groups, hosts, domains, taxonomies) have the same use of nested attributes, should they be changed? |
@domcleal it can be confusing, everything looks like it was saved and only when you look for your parameter you notice it isn't there. |
All models with parameters as nested attributes now act the same way as os. |
@domcleal I removed the tests that weren't relevant anymore |
@@ -18,18 +18,6 @@ class CommonParameterTest < ActiveSupport::TestCase | |||
assert parameter.save | |||
end | |||
|
|||
test "value can't be blank" do |
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.
I think it'd be better to invert the logic of the test: just have it check that the value can be blank, and can be empty.
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.
@domcleal thanks, I changed the tests
No description provided.