-
Notifications
You must be signed in to change notification settings - Fork 0
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
Node resource CRUD #85
Conversation
one |
c7c7523
to
452d4dc
Compare
rebased with develop, tests should now all pass |
# recieve new node | ||
node = NodeResource.create(project_id: Iam.settings.DB[:projects] | ||
.where(name: params[:project_name]) | ||
.get(:id) || node.project_id, |
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.
Does the || node.project_id
work if we're creating the node
being referred to?
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.
Oops, that won't work.
It should be OR'd with a blank('') if no project is found
This looks pretty good. The tests seem to cover the basics and the implementation is good. The tests seem to be covering the NodeResource model, do we have any interest in testing the endpoints? For instance we sould use the endpoint and checking the database to see if the right thing happened? I don't think we've been doing this but I think we really should. |
Added ~9 new tests for the /node endpoints. |
fixes issue #22
Changes in this PR.
/node
endpoint/node
endpoint similar to project and client in app.rbTesting this PR.
localhost:4567/nodes
will result in a blank page since we did not run the scheduler to fill the DB with dataExpected Output.