File: test_webhook.rb

package info (click to toggle)
god 0.7.18-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 888 kB
  • ctags: 953
  • sloc: ruby: 5,516; ansic: 241; makefile: 128; sh: 27
file content (17 lines) | stat: -rw-r--r-- 414 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require File.dirname(__FILE__) + '/helper'

class TestWebhook < Test::Unit::TestCase
  def test_exists
    God::Contacts::Webhook
  end

  def test_notify
    assert_nothing_raised do
      g = God::Contacts::Webhook.new
      g.hook_url = 'http://test/switch'
      Net::HTTP.expects(:post_form)
      g.notify(:a, :b, :c, :d, :e)
      assert_equal "sent webhook to http://test/switch", g.info
    end
  end
end