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

Commit

Permalink
removed username from tests
Browse files Browse the repository at this point in the history
  • Loading branch information
v-zhuravlev committed Apr 8, 2016
1 parent 9392bd5 commit 717a31f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions t/002_slack_mocks.t
Expand Up @@ -36,7 +36,7 @@ like this:
} }
=cut =cut
$slack_bot->mock_url($mock_url); $slack_bot->mock_url($mock_url);
my $response = $slack_bot->chat_postMessage( {channel=> 'channel', username => 'username', attachments=> {} }); my $response = $slack_bot->chat_postMessage( {channel=> 'channel', attachments=> {} });
ok($response->{ts} eq '1459856086.000002', 'Check ts in response'); ok($response->{ts} eq '1459856086.000002', 'Check ts in response');
ok($response->{ok} , 'Check ok in response'); ok($response->{ok} , 'Check ok in response');
ok($response->{channel} eq 'D0FJXP7L0', 'Check channel in response'); ok($response->{channel} eq 'D0FJXP7L0', 'Check channel in response');
Expand All @@ -51,7 +51,7 @@ HTTP 200 OK
=cut =cut
$mock_url = 'http://www.mocky.io/v2/5703b37a270000582106afc0'; $mock_url = 'http://www.mocky.io/v2/5703b37a270000582106afc0';
$slack_bot->mock_url($mock_url); $slack_bot->mock_url($mock_url);
throws_ok { $slack_bot->chat_postMessage( {channel=> 'channel', username => 'username', attachments=> {} }) } '/Error channel_not_found/', 'check wrong channel'; throws_ok { $slack_bot->chat_postMessage( {channel=> 'channel', attachments=> {} }) } '/Error channel_not_found/', 'check wrong channel';






Expand All @@ -65,7 +65,7 @@ HTTP 200 OK
=cut =cut
$mock_url = 'http://www.mocky.io/v2/5703b6d52700009b2106afc4'; $mock_url = 'http://www.mocky.io/v2/5703b6d52700009b2106afc4';
$slack_bot->mock_url($mock_url); $slack_bot->mock_url($mock_url);
lives_ok { $slack_bot->chat_postMessage( {channel=> 'channel', username => 'username', attachments=> {} }) } 'check wrong username'; lives_ok { $slack_bot->chat_postMessage( {channel=> 'channel',attachments=> {} }) } 'check message_not_found';






Expand Down

0 comments on commit 717a31f

Please sign in to comment.