File: base_spec.rb

package info (click to toggle)
ruby-uniform-notifier 1.16.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 240 kB
  • sloc: ruby: 915; makefile: 4
file content (20 lines) | stat: -rw-r--r-- 772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# frozen_string_literal: true

require 'spec_helper'

RSpec.describe UniformNotifier::Base do
  context '#inline_channel_notify' do
    before { allow(UniformNotifier::Base).to receive(:active?).and_return(true) }
    it 'should keep the compatibility' do
      expect(UniformNotifier::Base).to receive(:_inline_notify).once.with({ title: 'something' })
      UniformNotifier::Base.inline_notify('something')
    end
  end
  context '#out_of_channel_notify' do
    before { allow(UniformNotifier::Base).to receive(:active?).and_return(true) }
    it 'should keep the compatibility' do
      expect(UniformNotifier::Base).to receive(:_out_of_channel_notify).once.with({ title: 'something' })
      UniformNotifier::Base.out_of_channel_notify('something')
    end
  end
end