-
Notifications
You must be signed in to change notification settings - Fork 47
Space - Nora #27
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
base: master
Are you sure you want to change the base?
Space - Nora #27
Conversation
Task ListMajor Learning Goals/Code Review
Functional Requirements/Manual Testing
Overall Feedback
Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
beccaelenzil
left a comment
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.
Great work on this project! It's clear that the learning goals for your first rails project were met. Keep up the hard work.
| patch '/tasks/:id', to: 'tasks#update' | ||
| delete '/tasks/:id', to: 'tasks#destroy' | ||
|
|
||
| patch '/tasks/:id/mark_done', to: 'tasks#mark_done', as: 'mark_done' |
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.
Consider how making two separate methods, for instance mark_complete and mark_incomplete would make this action idempotent.
| id = Task.last.id | ||
| expect { | ||
| delete task_path(id) | ||
| }.must_change "Task.count" |
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.
Consider an even more precise test.
| }.must_change "Task.count" | |
| expect { | |
| delete task_path(id) | |
| }.will_differ "Task.count", -1 |
| expect { | ||
| delete task_path(id) | ||
| }.must_change "Task.count" | ||
|
|
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.
Remember to test for a redirect
|
|
||
| it "can update an existing task" do | ||
| # Your code here | ||
| Task.create(name: "Get Shit Done", description: "You gotta werk.") |
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.
Good work fleshing out this test.
| @@ -0,0 +1,14 @@ | |||
| <%= form_with model: @task, class: 'create-form' do |f| %> | |||
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.
Nice use of partial views.
| @@ -0,0 +1,3 @@ | |||
| <h2>Add a Task</h2> | |||
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.
Consider adding this to the partial by adding to the locals hash.
Task List
Congratulations! You're submitting your assignment!
Comprehension Questions