File: integration_test.rb

package info (click to toggle)
ruby-libnotify 0.9.4-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 200 kB
  • sloc: ruby: 358; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 521 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
require 'helper'

class IntegrationTest < LibnotifyTestCase
  test "display notification" do
    libnotify = Libnotify::API.new(:timeout => 0.5, :icon_path => :"emblem-favorite", :append => true)

    [ :low, :normal, :critical ].each do |urgency|
      libnotify.app_name = "test"
      libnotify.summary = "#{RUBY_VERSION} at #{RUBY_PLATFORM}"
      libnotify.body    = [ urgency, defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : '?' ].join(" ")
      libnotify.urgency = urgency
      libnotify.show!
    end
  end
end