Sha256: c664d7f15d255c47a2d6a40e484cf4528bba740c1ade26eb144e39d670e28a1d

Contents?: true

Size: 448 Bytes

Versions: 8

Compression:

Stored size: 448 Bytes

Contents

require File.dirname(__FILE__) + '/helper'

class TestWebhook < Test::Unit::TestCase
  def setup
    @webhook = God::Contacts::Webhook.new
  end

  def test_notify
    @webhook.url = 'http://example.com/switch'
    Net::HTTP.any_instance.expects(:request).returns(Net::HTTPSuccess.new('a', 'b', 'c'))

    @webhook.notify('msg', Time.now, 'prio', 'cat', 'host')
    assert_equal "sent webhook to http://example.com/switch", @webhook.info
  end
end

Version data entries

8 entries across 8 versions & 2 rubygems

Version Path
god-0.13.3 test/test_webhook.rb
god-0.13.2 test/test_webhook.rb
god-0.13.1 test/test_webhook.rb
god-0.13.0 test/test_webhook.rb
god-0.12.1 test/test_webhook.rb
god-0.12.0 test/test_webhook.rb
firenxis-god-0.11.0 test/test_webhook.rb
god-0.11.0 test/test_webhook.rb