Skip to content

Commit

Permalink
test(validation): test pushover validates priority
Browse files Browse the repository at this point in the history
- test that params passed for priority are correctly validated

[Finishes #150627411]
  • Loading branch information
kaka-ruto committed Sep 4, 2017
1 parent 07ee910 commit 2009319
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions hc/front/tests/test_add_pushbover.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,13 @@ def test_it_validates_nonce(self):
assert r.status_code == 403

### Test that pushover validates priority
def test_pushover_validates_priority(self):
self.client.login(username="alice@example.org", password="password")

session = self.client.session
session["po_nonce"] = "n"
session.save()

params = "pushover_user_key=a&nonce=n&prio=INVALID"
r = self.client.get("/integrations/add_pushover/?%s" % params)
assert r.status_code == 400

0 comments on commit 2009319

Please sign in to comment.