ResourceDataInc/commuter_challenge — pull request #91 by thejones (2014-07-10 19:19:10+00:00)
Title: Feedback needed for - Restrict team size

This code should accomplish two main things.
1. Remove the ability to approve new members if the approved membership count is already the same as the business size.
2. Remove the ability to set the business size lower than the approved count.

The individual user should not receive errors and will be added to the team. This allows users to start tracking commutes and puts the burden on the team Captain. The Captain can the approve, deny, or edit the business size.

I have all specs passing but only by modifying the participation calculator spec. (Adds 5 members and business size is set at 2). I am not sure if the spec is wrong or my code. I feel that by default the status is unapproved which should in theory not be affected by my code.

General
- [ ] Verify new code in team and membership models

Testing:
- [ ] Verify membership_spec is written correctly. I needed to create two users. One is the default and the other is user0
- [ ] Review participation_calculator_spec if model code and validations seem correct.