Skip to content
Permalink
Browse files

removed username from tests

  • Loading branch information...
v-zhuravlev committed Apr 8, 2016
1 parent 9392bd5 commit 717a31fabd6a7cd1564e5d67a84c936a0a6d5ff2
Showing with 3 additions and 3 deletions.
  1. +3 −3 t/002_slack_mocks.t
@@ -36,7 +36,7 @@ like this:
}
=cut
$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->{ok} , 'Check ok in response');
ok($response->{channel} eq 'D0FJXP7L0', 'Check channel in response');
@@ -51,7 +51,7 @@ HTTP 200 OK
=cut
$mock_url = 'http://www.mocky.io/v2/5703b37a270000582106afc0';
$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';



@@ -65,7 +65,7 @@ HTTP 200 OK
=cut
$mock_url = 'http://www.mocky.io/v2/5703b6d52700009b2106afc4';
$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';



0 comments on commit 717a31f

Please sign in to comment.
You can’t perform that action at this time.