File: ping_integration_test.rb

package info (click to toggle)
ruby-slack-notifier 2.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 288 kB
  • sloc: ruby: 1,076; makefile: 5
file content (16 lines) | stat: -rw-r--r-- 523 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true
# encoding: utf-8

require_relative "../../lib/slack-notifier"

ruby = if defined?(JRUBY_VERSION)
  "jruby #{JRUBY_VERSION}"
else
  "ruby #{RUBY_VERSION}"
end
puts "testing with #{ruby}"

notifier = Slack::Notifier.new ENV["SLACK_WEBHOOK_URL"], username: "notifier"
notifier.ping "hello", channel: ["#general", "#random"]
notifier.ping "hello/こんにちは from notifier test script on #{ruby}\225"
notifier.ping attachments: [{ color: "#1BF5AF", fallback: "fallback", text: "attachment" }]