spec/slack_spec.rb in danger-slack-0.0.2 vs spec/slack_spec.rb in danger-slack-0.0.3

- old
+ new

@@ -38,9 +38,19 @@ status: 200 ) expect(@my_plugin.channels).to eq [{ 'hoge' => 'fuga' }] end + it 'groups' do + stub_request(:get, 'https://slack.com/api/groups.list') + .with(query: { token: 'hoge' }) + .to_return( + body: '{"groups":[{"hoge":"fuga"}]}', + status: 200 + ) + expect(@my_plugin.groups).to eq [{ 'hoge' => 'fuga' }] + end + it 'notify with text' do stub_request(:post, 'https://slack.com/api/chat.postMessage') .with(query: hash_including(token: 'hoge')) .to_return( body: '{"ok":true}',