spec/bullet_spec.rb in bullet-5.4.0 vs spec/bullet_spec.rb in bullet-5.4.1
- old
+ new
@@ -101,29 +101,23 @@
before do
allow(Bullet).to receive(:for_each_active_notifier_with_notification).and_yield(notification)
allow(notification).to receive(:notify_out_of_channel)
end
- context 'when called with no args' do
- it 'should notification.url is nil' do
- expect(notification).to receive(:url=).with(nil)
- Bullet.perform_out_of_channel_notifications
- end
- end
-
context 'when called with Rack environment hash' do
let(:env) {
{
+ 'REQUEST_METHOD' => 'GET',
'PATH_INFO' => '/path',
'QUERY_STRING' => 'foo=bar',
}
}
context "when env['REQUEST_URI'] is nil" do
before { env['REQUEST_URI'] = nil }
it 'should notification.url is built' do
- expect(notification).to receive(:url=).with('/path?foo=bar')
+ expect(notification).to receive(:url=).with('GET /path?foo=bar')
Bullet.perform_out_of_channel_notifications(env)
end
end
context "when env['REQUEST_URI'] is present" do