Use scopes when possible

This commit is contained in:
gregoirenovel 2018-08-28 14:50:44 +02:00
parent 47962ef795
commit e60aa0c37b
4 changed files with 5 additions and 5 deletions

View file

@ -170,7 +170,7 @@ describe StatsController, type: :controller do
}
end
let (:association) { Dossier.where.not(:state => Dossier.states.fetch(:brouillon)) }
let (:association) { Dossier.state_not_brouillon }
subject { StatsController.new.send(:dossier_instruction_mean_time, association) }
@ -222,7 +222,7 @@ describe StatsController, type: :controller do
}
end
let (:association) { Dossier.where.not(:state => Dossier.states.fetch(:brouillon)) }
let (:association) { Dossier.state_not_brouillon }
subject { StatsController.new.send(:dossier_filling_mean_time, association) }