File: test_campfire.rb

package info (click to toggle)
ruby-god 0.13.7-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster
  • size: 832 kB
  • sloc: ruby: 6,641; ansic: 237; makefile: 3
file content (22 lines) | stat: -rw-r--r-- 528 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
require File.dirname(__FILE__) + '/helper'

class TestCampfire < Minitest::Test
  def setup
    @campfire = God::Contacts::Campfire.new
  end

  def test_exists
    God::Contacts::Campfire
  end

  def test_notify
    @campfire.subdomain = 'github'
    @campfire.token = 'abc'
    @campfire.room = 'danger'

    time = Time.now
    body = "[#{time.strftime('%H:%M:%S')}] host - msg"
    Marshmallow::Connection.any_instance.expects(:speak).with('danger', body)
    @campfire.notify('msg', time, 'prio', 'cat', 'host')
  end
end