Use enum to the fullest with Dossier.states

This commit is contained in:
gregoirenovel 2018-08-28 14:10:55 +02:00
parent ee25bba38c
commit 4b071ecf06
52 changed files with 221 additions and 221 deletions

View file

@ -1,7 +1,7 @@
require 'spec_helper'
describe 'users/carte/show.html.haml', type: :view do
let(:state) { 'brouillon' }
let(:state) { Dossier.states.fetch(:brouillon) }
let(:dossier) { create(:dossier, state: state) }
let(:dossier_id) { dossier.id }
@ -38,7 +38,7 @@ describe 'users/carte/show.html.haml', type: :view do
end
context 'si la page précédente est recapitularif' do
let(:state) { 'en_construction' }
let(:state) { Dossier.states.fetch(:en_construction) }
it 'le bouton "Etape suivante" n\'est pas présent' do
expect(rendered).to_not have_selector('#etape_suivante')