Tests: adapt to sqlite

This commit is contained in:
Simon Lehericey 2017-02-21 16:49:32 +01:00
parent 382b614095
commit b097e1d6b8
3 changed files with 4 additions and 2 deletions

View file

@ -181,7 +181,8 @@ class Admin::ProceduresController < AdminController
def path_list
render json: ProcedurePath
.joins(', procedures')
.where("procedures.id = procedure_paths.procedure_id AND procedures.archived != true")
.where("procedures.id = procedure_paths.procedure_id")
.where("procedures.archived" => false)
.where("path LIKE '%#{params[:request]}%'")
.pluck(:path, :administrateur_id)
.inject([]) {

View file

@ -1,5 +1,6 @@
class Notification < ActiveRecord::Base
belongs_to :dossier
serialize :liste if Rails.env.test?
# after_save :broadcast_notification

View file

@ -164,7 +164,7 @@ shared_examples 'carte_controller_spec' do
subject { Cadastre.last }
it { expect(subject.surface_intersection).to eq('0.0006') }
it { expect(subject.surface_parcelle).to eq(11252.6925830903) }
it { expect(subject.surface_parcelle).to eq(11252.692583090324) }
it { expect(subject.numero).to eq('0013') }
it { expect(subject.feuille).to eq(1) }
it { expect(subject.section).to eq('CD') }