Skip to content
This repository has been archived by the owner on Mar 26, 2024. It is now read-only.

permits :description param in new_node_groups #412

Merged
merged 2 commits into from
Jun 30, 2020

Conversation

big32mike
Copy link
Contributor

To add a :description to a NodeGroup upon creation, new_node_group must permit the :description command.

Started POST "/node_groups" for 127.0.0.1 at 2020-06-26 14:38:34 -0700
Processing by NodeGroupsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"cpgS7UPu3vVlZR9+2F9R6tKjJdslJGp3xolRnmNPDsZ+smcpy8ANhTmB1oJnPutHjMUQI8AHztgiErNRx7nBTw==", "force_create"=>"false", "node_group"=>{"name"=>"test_description", "description"=>"This doesn't get saved when creating a new group.", "parameter_attributes"=>[{"key"=>"", "value"=>""}], "assigned_node_class_ids"=>[""], "assigned_node_group_ids"=>[""], "assigned_node_ids"=>[""]}}
   (0.1ms)  BEGIN
  ↳ app/controllers/node_groups_controller.rb:19
Unpermitted parameter: :description
Unpermitted parameter: :description
Unpermitted parameter: :description

@sodabrew
Copy link
Owner

This is great, thank you! If there’s a test for creating a node group by api, please add a description to that test as well.

@sodabrew
Copy link
Owner

Specifically here:

describe "#create" do
it "should create a node group on successful creation" do
post :create, params: { node_group: { name: 'foo' } }
assigns[:node_group].name.should == 'foo'
end
if I could bug you to add a description field in this test and we'll get this merged straight away!

@big32mike
Copy link
Contributor Author

No problem.

@sodabrew sodabrew merged commit 56df5ed into sodabrew:master Jun 30, 2020
@sodabrew
Copy link
Owner

Thank you!

@big32mike big32mike deleted the fix_node_groups branch June 30, 2020 21:20
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants