Created rspec tests for Assignment's associations and attributes

Thoroughly inspected `Assignment`'s associations and attributes in order to create/ensure valid tests for them. Also, cleaned up some redundant code in the `Assignment` model.