YaleSTC/reservations — pull request #577 by squidgetx (2014-06-27 21:09:17+00:00)
Title: Fix failing tests on main branches

Currently, we have tests that consistently fail in branches that are deployment-ready.

On `origin/master`:
```
rspec ./spec/controllers/equipment_models_controller_spec.rb:215 # EquipmentModelsController PUT update with admin user with valid attributes
rspec ./spec/controllers/equipment_models_controller_spec.rb:223 # EquipmentModelsController PUT update with admin user with valid attributes
rspec ./spec/controllers/equipment_models_controller_spec.rb:216 # EquipmentModelsController PUT update with admin user with valid attributes sets @equipment_model to selected model
rspec ./spec/controllers/equipment_models_controller_spec.rb:219 # EquipmentModelsController PUT update with admin user with valid attributes updates attributes
rspec ./spec/models/announcement_spec.rb:5 # Announcement has current scope
rspec ./spec/models/announcement_spec.rb:17 # Announcement includes current when nil is passed in
rspec ./spec/models/announcement_spec.rb:11 # Announcement does not include ids passed in to current
```

On `origin/development`:
```
rspec ./spec/controllers/application_controller_spec.rb:238 # TestController check_if_is_admin user is not an admin should set the flash
rspec ./spec/controllers/application_controller_spec.rb:239 # TestController check_if_is_admin user is not an admin should redirect to "where_i_came_from"
rspec ./spec/controllers/application_controller_spec.rb:249 # TestController fix_cart_date changes cart.start_date to today if date is in the past
rspec ./spec/controllers/application_controller_spec.rb:310 # ApplicationController PUT update_cart valid parameters should update cart dates
rspec ./spec/controllers/equipment_models_controller_spec.rb:115 # EquipmentModelsController GET show with non-admin user should redirect to root should redirect to "http://test.host/"
rspec ./spec/controllers/equipment_models_controller_spec.rb:116 # EquipmentModelsController GET show with non-admin user should redirect to root should set the flash
rspec ./spec/controllers/equipment_models_controller_spec.rb:73 # EquipmentModelsController GET index with non-admin user should redirect to root should redirect to "http://test.host/"
rspec ./spec/controllers/equipment_models_controller_spec.rb:74 # EquipmentModelsController GET index with non-admin user should redirect to root should set the flash
rspec ./spec/models/announcement_spec.rb:5 # Announcement has current scope
rspec ./spec/models/announcement_spec.rb:11 # Announcement does not include ids passed in to current
rspec ./spec/models/announcement_spec.rb:17 # Announcement includes current when nil is passed in
rspec ./spec/models/cart_spec.rb:132 # Cart Reservation date changes .set_due_date sets new due dates for all items in cart
```
As far as I am aware, none of the pull requests in 3.3.0 have code that fixes any of those test failures; #403, #404 and #416 are only concerned with adding tests. Therefore, I suggest that we fix these tests ASAP and preferentially merge the fixes into development and master.