Remove the unused decorator DossierDecorator

This commit is contained in:
gregoirenovel 2018-12-27 12:04:10 +01:00 committed by Pierre de La Morinerie
parent 559df6b82a
commit b8f57415cd
2 changed files with 0 additions and 33 deletions

View file

@ -1,12 +0,0 @@
class DossierDecorator < Draper::Decorator
delegate :current_page, :limit_value, :total_pages
delegate_all
def first_creation
created_at.strftime('%d/%m/%Y %H:%M')
end
def last_update
updated_at.strftime('%d/%m/%Y %H:%M')
end
end

View file

@ -1,21 +0,0 @@
require 'spec_helper'
describe DossierDecorator do
let(:dossier) do
dossier = create(:dossier, created_at: Time.zone.local(2015, 12, 24, 14, 10))
dossier.update_column('updated_at', Time.zone.local(2015, 12, 24, 14, 10))
dossier
end
subject { dossier.decorate }
describe 'first_creation' do
subject { super().first_creation }
it { is_expected.to eq('24/12/2015 14:10') }
end
describe 'last_update' do
subject { super().last_update }
it { is_expected.to eq('24/12/2015 14:10') }
end
end