MarkUsProject/Markus — pull request #663 by NelleV (2012-02-14 14:05:03+00:00)
Title: closes #257 - closes #660 - restructured completely rubrics criteria

controller test.

- deleted redundant tests
- reorganised them
- properly used contexts and should - we have a speed up of 300% on this file

They know are of the form:

+ rubrics_controller_test.rb
|
+--- An unauthenticated and unauthorized user
| |
| +--- with an assignment
| | - should be redirected on index
| | - should be redirected on new
| | - should be redirected on :download_csv
| | - should be redirected on :download_yml
| | - should be redirected on :csv_upload
| | - should be redirected on :update_positions
| | - should be redirected on :move_criterion
| |
| +--- and a submission
| | - should be redirect on edit
| | - should be redirected on update
| | - should be redirect on delete
|
+--- An admin, with an assignment
| - should upload successfully properly formatted csv file
| - should deal properly with ill formatted CSV files
| - should upload successfully well formatted yml criteria
| - should deal with bad weight on yaml file
| - should deal properly with yml syntax error
| - should deal properly with empty yml file
|
+--- with a criterion
| - should see index
| - should be able to get on :edit
| - should be able to save with errors
| - should be able to save without errors
| - should be able to get the form for new rubric
| - should be able to save with error
| - should save without error on an assignment as the first
criterion
| - should save without errors
| - should delete criterion
| - should download rubrics as CSV
| - should upload yml file without deleting preexisting
criteria
|
+--- with another criterion
| - should be able to update_positions
| - should be able to move_criterion up
| - should be able to move_criterion down
|
+--- And yet another
| - should be able to move up top criteria
| - should be able to move down top criteria