Skip to content

Commit

Permalink
Add test for searching for a non-existent ticket
Browse files Browse the repository at this point in the history
  • Loading branch information
Alina Mackenzie committed Nov 15, 2015
1 parent 4686793 commit 089cd38
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test_requesttracker.py
Expand Up @@ -42,3 +42,15 @@ def test_find_ticket(self, testbot):
RT_CONFIG['DISPLAY_URL'],
str(ticket_id),
test_requestor) in testbot.pop_message()

def test_find_nonexistent_ticket(self, testbot):

testbot.push_message('!plugin config RT ' + str(RT_CONFIG))
assert 'Plugin configuration done.' in testbot.pop_message()

tracker = rt.Rt(RT_CONFIG['REST_URL'])
tracker.login(RT_CONFIG['USER'], RT_CONFIG['PASSWORD'])

testbot.push_message('999999999999999999999999999999999999999999999')
expected = "Sorry, that ticket does not exist or I cannot access it."
assert expected in testbot.pop_message()

0 comments on commit 089cd38

Please sign in to comment.