Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Commit

Permalink
Added test
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitpaulk committed Dec 14, 2014
1 parent 768984a commit 4c49b2c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/py/test_anonymous_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,17 @@ def test_participant_can_toggle_anonymous_receiving(self):
actual = json.loads(response.body)
assert actual['receiving'] is True

def test_team_cannot_toggle_anonymous_receiving(self):
self.make_participant('team', number='plural')
response = self.client.PxST(
'/team/anonymous.json',
auth_as='team',
data={'toggle': 'receiving'}
)
actual = response.code
expected = 400
assert actual == expected

def test_participant_can_toggle_anonymous_giving_back(self):
response = self.hit_anonymous('POST', data={'toggle': 'giving'})
response = self.hit_anonymous('POST', data={'toggle': 'giving'})
Expand Down

0 comments on commit 4c49b2c

Please sign in to comment.