Merge pull request #922 from sgmap/fix_test

Fix tests
This commit is contained in:
LeSim 2017-10-27 10:53:38 +02:00 committed by GitHub
commit 6ccbab903e
2 changed files with 7 additions and 2 deletions

View file

@ -1,7 +1,12 @@
require 'spec_helper'
describe DossierDecorator do
let(:dossier) { create(:dossier, created_at: Time.new(2015, 12, 24, 14, 10), updated_at: Time.new(2015, 12, 24, 14, 10)) }
let(:dossier) do
dossier = create(:dossier, created_at: Time.new(2015, 12, 24, 14, 10))
dossier.update_column('updated_at', Time.new(2015, 12, 24, 14, 10))
dossier
end
subject { dossier.decorate }
describe 'first_creation' do

View file

@ -887,7 +887,7 @@ describe Dossier do
it { expect(dossier.get_value('type_de_champ_private', @champ_private.type_de_champ.id.to_s)).to eq(dossier.champs_private.first.value) }
end
describe 'updated_at', focus: true do
describe 'updated_at' do
let!(:dossier) { create(:dossier) }
let(:modif_date) { DateTime.parse('01/01/2100') }