Remove notifications

This commit is contained in:
gregoirenovel 2018-02-01 16:20:31 +01:00
parent 6f325b6756
commit 142241dd16
25 changed files with 7 additions and 450 deletions

View file

@ -1,24 +0,0 @@
require 'spec_helper'
describe NotificationService do
describe '.notify' do
let(:dossier) { create :dossier }
let(:service) { described_class.new type_notif, dossier.id }
subject { service.notify }
context 'when is the first notification for dossier_id and type_notif and alread_read is false' do
let(:type_notif) { 'commentaire' }
it { expect { subject }.to change(Notification, :count).by (1) }
context 'when is not the first notification' do
before do
create :notification, dossier: dossier, type_notif: type_notif
end
it { expect { subject }.to change(Notification, :count).by (0) }
end
end
end
end