test: add tests for GradersController#7946
Conversation
Coverage Report for CI Build 25967987835Coverage increased (+0.01%) to 91.776%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
david-yz-liu
left a comment
There was a problem hiding this comment.
Nice work, @YheChen! I left a few comments, and in addition to those I noticed that our pre-commit bot made some changes to your PR. This indicates that you may not have pre-commit hooks set up correctly locally on your machine; please review this part of the setup instructions.
|
|
||
| context 'doing a GET on :grader_groupings_mapping' do | ||
| it 'returns a CSV mapping each grouping to its assigned graders' do | ||
| ta1 = create(:ta, user: create(:end_user, user_name: 'g9browni')) |
There was a problem hiding this comment.
Rather than hard-code specific names here, you can write ta1 = create(:ta) and then below use ta1.user.user_name. This will help make the test expected values more explicitly connected to the underlying data.
The same is true for specifying group names.
| ### 🚨 Breaking changes | ||
|
|
||
| ### ✨ New features and improvements | ||
|
|
There was a problem hiding this comment.
In general please do not make formatting changes to files; formatting is configured through our pre-commit hooks.
There was a problem hiding this comment.
Pre-commit should be properly setup on my laptop now
|
|
||
| ### ✨ New features and improvements | ||
|
|
||
| - Added tests for `GradersController` to fully cover `grader_groupers_mapping` (#7946) |
There was a problem hiding this comment.
Add this to "Internal Changes". We reserve "New features and improvements" for user-facing changes.
|
Oh and in response to your question, please do not delete sections of the PR template. As part of my review I'll provide feedback on whether you've filled out the template correctly, and it's easier for me to do this review when all of the sections are present. |
28246a4 to
a82bd77
Compare
75092d0 to
897adf2
Compare
| - Sync due date when creating or updating LTI gradebook line items, and re-sync automatically when an assessment is edited (#7872) | ||
|
|
||
| ### 🐛 Bug fixes | ||
|
|
There was a problem hiding this comment.
There are still whitespace changes throughout this file that should be reverted. (You might find it easier to reset the file to how it is on master and then just add back in the new entry.)
There was a problem hiding this comment.
Oh I just added Changelog.md to .prettierignore, didn't realize that was an option
YheChen
left a comment
There was a problem hiding this comment.
i did not mean to click the start review button
for more information, see https://pre-commit.ci
…icked my changes there
b8bc7eb to
62ea07e
Compare
david-yz-liu
left a comment
There was a problem hiding this comment.
Nice work, @YheChen!
Proposed Changes
graders_controller_spec.rbGET: grader_groupings_mappingand asserts the response is200 OKwithtext/csvmedia type and the expectedContent-Dispositionattachment filename. Also parses the csv body and makes sure each grouping is mapped correctly to the grader usernames.Changelog.mdto reflect above changedoc/markus-contributors.txtScreenshots of your changes (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments
(Include any questions or comments you have regarding your changes.)