Skip to content

Commit

Permalink
Add regular join test
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpowa committed Apr 12, 2016
1 parent 7ae34a6 commit ce6a4fb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/test_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ def test_quit_pretrigger(nick):
assert pretrigger.sender is None


def test_join_pretrigger(nick):
line = ':[email protected] JOIN #Sopel'
pretrigger = PreTrigger(nick, line)
assert pretrigger.tags == {}
assert pretrigger.hostmask == '[email protected]'
assert pretrigger.line == line
assert pretrigger.args == ['#Sopel']
assert pretrigger.event == 'JOIN'
assert pretrigger.nick == Identifier('Foo')
assert pretrigger.user == 'foo'
assert pretrigger.host == 'example.com'
assert pretrigger.sender == Identifier('Foo')


def test_tags_pretrigger(nick):
line = '@foo=bar;baz;sopel.chat/special=value :[email protected] PRIVMSG #Sopel :Hello, world'
pretrigger = PreTrigger(nick, line)
Expand Down

0 comments on commit ce6a4fb

Please sign in to comment.