Enable the Layout/AlignParameters cop

This commit is contained in:
gregoirenovel 2017-06-12 13:49:51 +02:00
parent 50fad54538
commit 9439e1abb1
39 changed files with 221 additions and 220 deletions

View file

@ -14,7 +14,8 @@ Layout/AlignHash:
Enabled: false Enabled: false
Layout/AlignParameters: Layout/AlignParameters:
Enabled: false Enabled: true
EnforcedStyle: with_fixed_indentation
Layout/BlockEndNewline: Layout/BlockEndNewline:
Enabled: false Enabled: false

View file

@ -7,17 +7,17 @@ class Admin::AccompagnateursController < AdminController
def show def show
assign_scope = @procedure.gestionnaires assign_scope = @procedure.gestionnaires
@accompagnateurs_assign = smart_listing_create :accompagnateurs_assign, @accompagnateurs_assign = smart_listing_create :accompagnateurs_assign,
assign_scope, assign_scope,
partial: "admin/accompagnateurs/list_assign", partial: "admin/accompagnateurs/list_assign",
array: true array: true
not_assign_scope = current_administrateur.gestionnaires.where.not(id: assign_scope.ids) not_assign_scope = current_administrateur.gestionnaires.where.not(id: assign_scope.ids)
not_assign_scope = not_assign_scope.where("email LIKE '%#{params[:filter]}%'") if params[:filter] not_assign_scope = not_assign_scope.where("email LIKE '%#{params[:filter]}%'") if params[:filter]
@accompagnateurs_not_assign = smart_listing_create :accompagnateurs_not_assign, @accompagnateurs_not_assign = smart_listing_create :accompagnateurs_not_assign,
not_assign_scope, not_assign_scope,
partial: "admin/accompagnateurs/list_not_assign", partial: "admin/accompagnateurs/list_not_assign",
array: true array: true
@gestionnaire ||= Gestionnaire.new @gestionnaire ||= Gestionnaire.new
end end

View file

@ -4,9 +4,10 @@ class Admin::GestionnairesController < AdminController
def index def index
@gestionnaires = smart_listing_create :gestionnaires, @gestionnaires = smart_listing_create :gestionnaires,
current_administrateur.gestionnaires, current_administrateur.gestionnaires,
partial: "admin/gestionnaires/list", partial: "admin/gestionnaires/list",
array: true array: true
@gestionnaire ||= Gestionnaire.new @gestionnaire ||= Gestionnaire.new
end end

View file

@ -6,18 +6,18 @@ class Admin::ProceduresController < AdminController
def index def index
@procedures = smart_listing_create :procedures, @procedures = smart_listing_create :procedures,
current_administrateur.procedures.where(published: true, archived: false).order(created_at: :desc), current_administrateur.procedures.where(published: true, archived: false).order(created_at: :desc),
partial: "admin/procedures/list", partial: "admin/procedures/list",
array: true array: true
active_class active_class
end end
def archived def archived
@procedures = smart_listing_create :procedures, @procedures = smart_listing_create :procedures,
current_administrateur.procedures.where(archived: true).order(created_at: :desc), current_administrateur.procedures.where(archived: true).order(created_at: :desc),
partial: "admin/procedures/list", partial: "admin/procedures/list",
array: true array: true
archived_class archived_class
@ -26,9 +26,9 @@ class Admin::ProceduresController < AdminController
def draft def draft
@procedures = smart_listing_create :procedures, @procedures = smart_listing_create :procedures,
current_administrateur.procedures.where(published: false, archived: false).order(created_at: :desc), current_administrateur.procedures.where(published: false, archived: false).order(created_at: :desc),
partial: "admin/procedures/list", partial: "admin/procedures/list",
array: true array: true
draft_class draft_class

View file

@ -8,11 +8,9 @@ class AdministrationsController < ApplicationController
@admin = Administrateur.new @admin = Administrateur.new
@admins = smart_listing_create :admins, @admins = smart_listing_create :admins,
Administrateur.all.order(:email), Administrateur.all.order(:email),
partial: "administrations/list", partial: "administrations/list",
array: true array: true
end end
def create def create

View file

@ -79,17 +79,17 @@ class Backoffice::DossiersController < Backoffice::DossiersListController
end end
smart_listing_create :search, smart_listing_create :search,
@dossiers, @dossiers,
partial: "backoffice/dossiers/list", partial: "backoffice/dossiers/list",
array: true, array: true,
default_sort: dossiers_list_facade.service.default_sort default_sort: dossiers_list_facade.service.default_sort
rescue RuntimeError rescue RuntimeError
smart_listing_create :search, smart_listing_create :search,
[], [],
partial: "backoffice/dossiers/list", partial: "backoffice/dossiers/list",
array: true, array: true,
default_sort: dossiers_list_facade.service.default_sort default_sort: dossiers_list_facade.service.default_sort
end end
def receive def receive

View file

@ -48,10 +48,10 @@ class Backoffice::DossiersListController < ApplicationController
def default_smart_listing_create name, collection def default_smart_listing_create name, collection
smart_listing_create name, smart_listing_create name,
collection, collection,
partial: 'backoffice/dossiers/list', partial: 'backoffice/dossiers/list',
array: true, array: true,
default_sort: dossiers_list_facade.service.default_sort default_sort: dossiers_list_facade.service.default_sort
end end
def param_smart_listing def param_smart_listing

View file

@ -15,14 +15,14 @@ class BackofficeController < ApplicationController
def invitations def invitations
pending_avis = current_gestionnaire.avis.without_answer.includes(dossier: [:procedure]).by_latest pending_avis = current_gestionnaire.avis.without_answer.includes(dossier: [:procedure]).by_latest
@pending_avis = smart_listing_create :pending_avis, @pending_avis = smart_listing_create :pending_avis,
pending_avis, pending_avis,
partial: 'backoffice/dossiers/list_invitations', partial: 'backoffice/dossiers/list_invitations',
array: true array: true
avis_with_answer = current_gestionnaire.avis.with_answer.includes(dossier: [:procedure]).by_latest avis_with_answer = current_gestionnaire.avis.with_answer.includes(dossier: [:procedure]).by_latest
@avis_with_answer = smart_listing_create :avis_with_answer, @avis_with_answer = smart_listing_create :avis_with_answer,
avis_with_answer, avis_with_answer,
partial: 'backoffice/dossiers/list_invitations', partial: 'backoffice/dossiers/list_invitations',
array: true array: true
end end
end end

View file

@ -1,9 +1,9 @@
class CommentairesController < ApplicationController class CommentairesController < ApplicationController
def index def index
@facade = DossierFacades.new( @facade = DossierFacades.new(
params[:dossier_id], params[:dossier_id],
(current_gestionnaire || current_user).email, (current_gestionnaire || current_user).email,
params[:champs_id] params[:champs_id]
) )
render layout: false render layout: false
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound

View file

@ -6,8 +6,8 @@ class DemoController < ApplicationController
return redirect_to root_path if Rails.env.production? return redirect_to root_path if Rails.env.production?
smart_listing_create :procedures, smart_listing_create :procedures,
Procedure.where(archived: false, published: true).order("id DESC"), Procedure.where(archived: false, published: true).order("id DESC"),
partial: "demo/list", partial: "demo/list",
array: true array: true
end end
end end

View file

@ -30,9 +30,9 @@ class Users::DossiersController < UsersController
end end
@dossiers = smart_listing_create :dossiers, @dossiers = smart_listing_create :dossiers,
@dossiers_filtered, @dossiers_filtered,
partial: "users/dossiers/list", partial: "users/dossiers/list",
array: true array: true
end end
def commencer def commencer

View file

@ -17,8 +17,8 @@ class UsersController < ApplicationController
def authorized_routes? controller def authorized_routes? controller
redirect_to_root_path 'Le status de votre dossier n\'autorise pas cette URL' unless UserRoutesAuthorizationService.authorized_route?( redirect_to_root_path 'Le status de votre dossier n\'autorise pas cette URL' unless UserRoutesAuthorizationService.authorized_route?(
controller, controller,
current_user_dossier) current_user_dossier)
rescue ActiveRecord::RecordNotFound rescue ActiveRecord::RecordNotFound
redirect_to_root_path 'Vous navez pas accès à ce dossier.' redirect_to_root_path 'Vous navez pas accès à ce dossier.'
end end

View file

@ -18,8 +18,8 @@ class CARTO::SGMAP::API
verify_ssl_mode = OpenSSL::SSL::VERIFY_NONE verify_ssl_mode = OpenSSL::SSL::VERIFY_NONE
RestClient::Resource.new( RestClient::Resource.new(
url, url,
verify_ssl: verify_ssl_mode, verify_ssl: verify_ssl_mode,
).post params[:geojson], content_type: 'application/json' ).post params[:geojson], content_type: 'application/json'
rescue RestClient::InternalServerError rescue RestClient::InternalServerError

View file

@ -1,6 +1,6 @@
class Administrateur < ActiveRecord::Base class Administrateur < ActiveRecord::Base
devise :database_authenticatable, :registerable, devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable :recoverable, :rememberable, :trackable, :validatable
has_and_belongs_to_many :gestionnaires has_and_belongs_to_many :gestionnaires
has_many :procedures has_many :procedures

View file

@ -1,6 +1,6 @@
class Gestionnaire < ActiveRecord::Base class Gestionnaire < ActiveRecord::Base
devise :database_authenticatable, :registerable, devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable :recoverable, :rememberable, :trackable, :validatable
has_and_belongs_to_many :administrateurs has_and_belongs_to_many :administrateurs

View file

@ -33,7 +33,7 @@ class PieceJustificative < ActiveRecord::Base
(RemoteDownloader.new content.filename).url (RemoteDownloader.new content.filename).url
else else
(LocalDownloader.new content.path, (LocalDownloader.new content.path,
(type_de_piece_justificative.nil? ? content.original_filename : type_de_piece_justificative.libelle)).url (type_de_piece_justificative.nil? ? content.original_filename : type_de_piece_justificative.libelle)).url
end end
end end
end end

View file

@ -7,7 +7,7 @@ class User < ActiveRecord::Base
# Include default devise modules. Others available are: # Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable # :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable, devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable :recoverable, :rememberable, :trackable, :validatable
has_many :dossiers, dependent: :destroy has_many :dossiers, dependent: :destroy
has_many :invites, dependent: :destroy has_many :invites, dependent: :destroy

View file

@ -1,6 +1,6 @@
class CerfaSerializer < ActiveModel::Serializer class CerfaSerializer < ActiveModel::Serializer
attributes :created_at, attributes :created_at,
:content_url :content_url
has_one :user has_one :user
end end

View file

@ -1,5 +1,5 @@
class CommentaireSerializer < ActiveModel::Serializer class CommentaireSerializer < ActiveModel::Serializer
attributes :email, attributes :email,
:body, :body,
:created_at :created_at
end end

View file

@ -1,16 +1,16 @@
class DossierSerializer < ActiveModel::Serializer class DossierSerializer < ActiveModel::Serializer
attributes :id, attributes :id,
:created_at, :created_at,
:updated_at, :updated_at,
:archived, :archived,
:mandataire_social, :mandataire_social,
:state, :state,
:simplified_state, :simplified_state,
:initiated_at, :initiated_at,
:received_at, :received_at,
:processed_at, :processed_at,
:accompagnateurs, :accompagnateurs,
:invites :invites
has_one :entreprise has_one :entreprise
has_one :etablissement has_one :etablissement

View file

@ -1,20 +1,20 @@
class DossierTableExportSerializer < ActiveModel::Serializer class DossierTableExportSerializer < ActiveModel::Serializer
attributes :id, attributes :id,
:created_at, :created_at,
:updated_at, :updated_at,
:archived, :archived,
:mandataire_social, :mandataire_social,
:state, :state,
:initiated_at, :initiated_at,
:received_at, :received_at,
:processed_at :processed_at
attribute :emails_accompagnateurs attribute :emails_accompagnateurs
attributes :individual_gender, attributes :individual_gender,
:individual_prenom, :individual_prenom,
:individual_nom, :individual_nom,
:individual_birthdate :individual_birthdate
def individual_prenom def individual_prenom
object.individual.try(:prenom) object.individual.try(:prenom)

View file

@ -1,4 +1,4 @@
class DossiersSerializer < ActiveModel::Serializer class DossiersSerializer < ActiveModel::Serializer
attributes :id, attributes :id,
:updated_at :updated_at
end end

View file

@ -1,14 +1,14 @@
class EntrepriseSerializer < ActiveModel::Serializer class EntrepriseSerializer < ActiveModel::Serializer
attributes :siren, attributes :siren,
:capital_social, :capital_social,
:numero_tva_intracommunautaire, :numero_tva_intracommunautaire,
:forme_juridique, :forme_juridique,
:forme_juridique_code, :forme_juridique_code,
:nom_commercial, :nom_commercial,
:raison_sociale, :raison_sociale,
:siret_siege_social, :siret_siege_social,
:code_effectif_entreprise, :code_effectif_entreprise,
:date_creation, :date_creation,
:nom, :nom,
:prenom :prenom
end end

View file

@ -1,15 +1,14 @@
class EtablissementSerializer < ActiveModel::Serializer class EtablissementSerializer < ActiveModel::Serializer
attributes :siret, attributes :siret,
:siege_social, :siege_social,
:naf, :naf,
:libelle_naf, :libelle_naf,
:adresse, :adresse,
:numero_voie, :numero_voie,
:type_voie, :type_voie,
:nom_voie, :nom_voie,
:complement_adresse, :complement_adresse,
:code_postal, :code_postal,
:localite, :localite,
:code_insee_localite :code_insee_localite
end end

View file

@ -1,7 +1,5 @@
class ModuleApiCartoSerializer < ActiveModel::Serializer class ModuleApiCartoSerializer < ActiveModel::Serializer
attributes :use_api_carto, attributes :use_api_carto,
:quartiers_prioritaires, :quartiers_prioritaires,
:cadastre :cadastre
end end

View file

@ -1,7 +1,7 @@
class PieceJustificativeSerializer < ActiveModel::Serializer class PieceJustificativeSerializer < ActiveModel::Serializer
attributes :created_at, attributes :created_at,
:type_de_piece_justificative_id, :type_de_piece_justificative_id,
:content_url :content_url
has_one :user has_one :user
end end

View file

@ -3,13 +3,12 @@ class ProcedureSerializer < ActiveModel::Serializer
attribute :lien_demarche, key: :link attribute :lien_demarche, key: :link
attributes :id, attributes :id,
:description, :description,
:organisation, :organisation,
:direction, :direction,
:archived, :archived,
:geographic_information, :geographic_information,
:total_dossier :total_dossier
has_one :geographic_information, serializer: ModuleApiCartoSerializer has_one :geographic_information, serializer: ModuleApiCartoSerializer
has_many :types_de_champ, serializer: TypeDeChampSerializer has_many :types_de_champ, serializer: TypeDeChampSerializer

View file

@ -1,7 +1,7 @@
class TypeDeChampSerializer < ActiveModel::Serializer class TypeDeChampSerializer < ActiveModel::Serializer
attributes :id, attributes :id,
:libelle, :libelle,
:type_champ, :type_champ,
:order_place, :order_place,
:description :description
end end

View file

@ -1,7 +1,7 @@
class TypeDePieceJustificativeSerializer < ActiveModel::Serializer class TypeDePieceJustificativeSerializer < ActiveModel::Serializer
attributes :id, attributes :id,
:libelle, :libelle,
:description, :description,
:order_place, :order_place,
:lien_demarche :lien_demarche
end end

View file

@ -14,11 +14,14 @@ describe Backoffice::PreferenceListDossierController, type: :controller do
describe '#POST add' do describe '#POST add' do
subject { post :add, subject { post :add,
params: {libelle: libelle, params: {
table: table, libelle: libelle,
attr: attr, table: table,
attr_decorate: attr_decorate, attr: attr,
bootstrap_lg: bootstrap_lg} } attr_decorate: attr_decorate,
bootstrap_lg: bootstrap_lg
}
}
it { expect(subject.status).to eq 200 } it { expect(subject.status).to eq 200 }
it { expect { subject }.to change(PreferenceListDossier, :count).by(1) } it { expect { subject }.to change(PreferenceListDossier, :count).by(1) }

View file

@ -13,10 +13,13 @@ describe Backoffice::PrivateFormulairesController, type: :controller do
describe '#PATCH update' do describe '#PATCH update' do
subject { patch :update, subject { patch :update,
params: {dossier_id: dossier.id, params: {
champs: { dossier_id: dossier.id,
"'#{dossier.champs_private.first.id}'" => dossier_champs_first champs: {
}} } "'#{dossier.champs_private.first.id}'" => dossier_champs_first
}
}
}
before do before do
subject subject

View file

@ -7,17 +7,17 @@ describe DossiersListFacades do
let(:procedure_2) { create :procedure, libelle: 'Ma seconde procédure' } let(:procedure_2) { create :procedure, libelle: 'Ma seconde procédure' }
let!(:preference) { create :preference_list_dossier, let!(:preference) { create :preference_list_dossier,
gestionnaire: gestionnaire, gestionnaire: gestionnaire,
table: nil, table: nil,
attr: 'state', attr: 'state',
attr_decorate: 'display_state' } attr_decorate: 'display_state' }
let!(:preference_2) { create :preference_list_dossier, let!(:preference_2) { create :preference_list_dossier,
gestionnaire: gestionnaire, gestionnaire: gestionnaire,
table: 'champs', table: 'champs',
attr: 'state', attr: 'state',
attr_decorate: 'display_state', attr_decorate: 'display_state',
procedure_id: procedure.id } procedure_id: procedure.id }
before do before do
create :assign_to, procedure: procedure, gestionnaire: gestionnaire create :assign_to, procedure: procedure, gestionnaire: gestionnaire
@ -58,12 +58,12 @@ describe DossiersListFacades do
let(:facade) { described_class.new gestionnaire, 'nouveaux', procedure_2 } let(:facade) { described_class.new gestionnaire, 'nouveaux', procedure_2 }
let!(:preference) { create :preference_list_dossier, let!(:preference) { create :preference_list_dossier,
gestionnaire: gestionnaire, gestionnaire: gestionnaire,
table: table, table: table,
attr: 'state', attr: 'state',
attr_decorate: 'display_state', attr_decorate: 'display_state',
filter: filter, filter: filter,
procedure_id: procedure_id } procedure_id: procedure_id }
subject { facade.active_filter? preference } subject { facade.active_filter? preference }
@ -99,12 +99,12 @@ describe DossiersListFacades do
before do before do
create :preference_list_dossier, create :preference_list_dossier,
gestionnaire: gestionnaire, gestionnaire: gestionnaire,
table: 'champs', table: 'champs',
attr: 'state', attr: 'state',
attr_decorate: 'display_state', attr_decorate: 'display_state',
filter: 'plop', filter: 'plop',
procedure_id: procedure_id procedure_id: procedure_id
end end
it { is_expected.to be_falsey } it { is_expected.to be_falsey }

View file

@ -34,13 +34,13 @@ feature 'France Connect Particulier Connexion' do
context 'when authentification is ok' do context 'when authentification is ok' do
let(:france_connect_information) { create(:france_connect_information, let(:france_connect_information) { create(:france_connect_information,
france_connect_particulier_id: france_connect_particulier_id, france_connect_particulier_id: france_connect_particulier_id,
given_name: given_name, given_name: given_name,
family_name: family_name, family_name: family_name,
birthdate: birthdate, birthdate: birthdate,
birthplace: birthplace, birthplace: birthplace,
gender: gender, gender: gender,
email_france_connect: email) } email_france_connect: email) }
before do before do
allow_any_instance_of(FranceConnectParticulierClient).to receive(:authorization_uri).and_return(france_connect_particulier_callback_path(code: code)) allow_any_instance_of(FranceConnectParticulierClient).to receive(:authorization_uri).and_return(france_connect_particulier_callback_path(code: code))

View file

@ -231,12 +231,12 @@ describe DossiersListGestionnaireService do
context 'when preference list contain a champ' do context 'when preference list contain a champ' do
before do before do
create :preference_list_dossier, create :preference_list_dossier,
gestionnaire: gestionnaire, gestionnaire: gestionnaire,
table: 'champs', table: 'champs',
attr: '34', attr: '34',
attr_decorate: '', attr_decorate: '',
filter: 'plop', filter: 'plop',
procedure_id: create(:procedure) procedure_id: create(:procedure)
end end
it { is_expected.to eq "CAST(dossiers.id as TEXT) LIKE '%23%' AND CAST(entreprises.raison_sociale as TEXT) LIKE '%plop%' AND champs.type_de_champ_id = 34 AND CAST(champs.value as TEXT) LIKE '%plop%'" } it { is_expected.to eq "CAST(dossiers.id as TEXT) LIKE '%23%' AND CAST(entreprises.raison_sociale as TEXT) LIKE '%plop%' AND champs.type_de_champ_id = 34 AND CAST(champs.value as TEXT) LIKE '%plop%'" }

View file

@ -12,14 +12,14 @@ describe 'admin/accompagnateurs/show.html.haml', type: :view do
assign(:gestionnaire, Gestionnaire.new) assign(:gestionnaire, Gestionnaire.new)
assign(:accompagnateurs_assign, (smart_listing_create :accompagnateurs_assign, assign(:accompagnateurs_assign, (smart_listing_create :accompagnateurs_assign,
assign_gestionnaires, assign_gestionnaires,
partial: "admin/accompagnateurs/list_assign", partial: "admin/accompagnateurs/list_assign",
array: true)) array: true))
assign(:accompagnateurs_not_assign, (smart_listing_create :accompagnateurs_not_assign, assign(:accompagnateurs_not_assign, (smart_listing_create :accompagnateurs_not_assign,
not_assign_gestionnaires, not_assign_gestionnaires,
partial: "admin/accompagnateurs/list_not_assign", partial: "admin/accompagnateurs/list_not_assign",
array: true)) array: true))
end end
context 'when admin have none accompagnateur ' do context 'when admin have none accompagnateur ' do
@ -43,14 +43,14 @@ describe 'admin/accompagnateurs/show.html.haml', type: :view do
assign_gestionnaires.reload assign_gestionnaires.reload
assign(:accompagnateurs_assign, (smart_listing_create :accompagnateurs_assign, assign(:accompagnateurs_assign, (smart_listing_create :accompagnateurs_assign,
assign_gestionnaires, assign_gestionnaires,
partial: "admin/accompagnateurs/list_assign", partial: "admin/accompagnateurs/list_assign",
array: true)) array: true))
assign(:accompagnateurs_not_assign, (smart_listing_create :accompagnateurs_not_assign, assign(:accompagnateurs_not_assign, (smart_listing_create :accompagnateurs_not_assign,
not_assign_gestionnaires, not_assign_gestionnaires,
partial: "admin/accompagnateurs/list_not_assign", partial: "admin/accompagnateurs/list_not_assign",
array: true)) array: true))
render render
end end

View file

@ -6,9 +6,9 @@ describe 'admin/gestionnaires/index.html.haml', type: :view do
before do before do
assign(:gestionnaires, (smart_listing_create :gestionnaires, assign(:gestionnaires, (smart_listing_create :gestionnaires,
admin.gestionnaires, admin.gestionnaires,
partial: "admin/gestionnaires/list", partial: "admin/gestionnaires/list",
array: true)) array: true))
assign(:gestionnaire, Gestionnaire.new()) assign(:gestionnaire, Gestionnaire.new())
end end
@ -24,9 +24,9 @@ describe 'admin/gestionnaires/index.html.haml', type: :view do
create(:gestionnaire, administrateurs: [admin]) create(:gestionnaire, administrateurs: [admin])
admin.reload admin.reload
assign(:gestionnaires, (smart_listing_create :gestionnaires, assign(:gestionnaires, (smart_listing_create :gestionnaires,
admin.gestionnaires, admin.gestionnaires,
partial: "admin/gestionnaires/list", partial: "admin/gestionnaires/list",
array: true)) array: true))
render render
end end
it { expect(rendered).to match(/gest\d+@gest.com/) } it { expect(rendered).to match(/gest\d+@gest.com/) }

View file

@ -65,8 +65,7 @@ describe 'admin/previsualisations/show.html.haml', type: :view do
context 'les valeurs sont réaffichées si elles sont présentes dans la BDD' do context 'les valeurs sont réaffichées si elles sont présentes dans la BDD' do
let!(:dossier) do let!(:dossier) do
create(:dossier, create(:dossier, user: user)
user: user)
end end
before do before do

View file

@ -29,28 +29,28 @@ describe 'backoffice/dossiers/index.html.haml', type: :view do
decorate_dossier_without_continuation.entreprise.update_column(:raison_sociale, 'plnp') decorate_dossier_without_continuation.entreprise.update_column(:raison_sociale, 'plnp')
create :preference_list_dossier, create :preference_list_dossier,
gestionnaire: gestionnaire, gestionnaire: gestionnaire,
table: nil, table: nil,
attr: 'state', attr: 'state',
attr_decorate: 'display_state' attr_decorate: 'display_state'
create :preference_list_dossier, create :preference_list_dossier,
gestionnaire: gestionnaire, gestionnaire: gestionnaire,
table: 'procedure', table: 'procedure',
attr: 'libelle', attr: 'libelle',
attr_decorate: 'libelle' attr_decorate: 'libelle'
create :preference_list_dossier, create :preference_list_dossier,
gestionnaire: gestionnaire, gestionnaire: gestionnaire,
table: 'entreprise', table: 'entreprise',
attr: 'raison_sociale', attr: 'raison_sociale',
attr_decorate: 'raison_sociale' attr_decorate: 'raison_sociale'
create :preference_list_dossier, create :preference_list_dossier,
gestionnaire: gestionnaire, gestionnaire: gestionnaire,
table: nil, table: nil,
attr: 'last_update', attr: 'last_update',
attr_decorate: 'last_update' attr_decorate: 'last_update'
create :assign_to, gestionnaire: gestionnaire, procedure: procedure create :assign_to, gestionnaire: gestionnaire, procedure: procedure
sign_in gestionnaire sign_in gestionnaire
@ -58,19 +58,19 @@ describe 'backoffice/dossiers/index.html.haml', type: :view do
assign :facade_data_view, dossiers_list_facade assign :facade_data_view, dossiers_list_facade
assign(:new_dossiers, (smart_listing_create :new_dossiers, assign(:new_dossiers, (smart_listing_create :new_dossiers,
new_dossiers_list, new_dossiers_list,
partial: "backoffice/dossiers/list", partial: "backoffice/dossiers/list",
array: true)) array: true))
assign(:follow_dossiers, (smart_listing_create :follow_dossiers, assign(:follow_dossiers, (smart_listing_create :follow_dossiers,
follow_dossiers_list, follow_dossiers_list,
partial: "backoffice/dossiers/list", partial: "backoffice/dossiers/list",
array: true)) array: true))
assign(:all_state_dossiers, (smart_listing_create :all_state_dossiers, assign(:all_state_dossiers, (smart_listing_create :all_state_dossiers,
all_state_dossiers_list, all_state_dossiers_list,
partial: "backoffice/dossiers/list", partial: "backoffice/dossiers/list",
array: true)) array: true))
render render
end end

View file

@ -22,9 +22,9 @@ describe 'users/dossiers/index.html.haml', type: :view do
assign :dossiers_list_facade, (DossiersListFacades.new user, liste) assign :dossiers_list_facade, (DossiersListFacades.new user, liste)
assign(:dossiers, (smart_listing_create :dossiers, assign(:dossiers, (smart_listing_create :dossiers,
dossiers_to_display, dossiers_to_display,
partial: "users/dossiers/list", partial: "users/dossiers/list",
array: true)) array: true))
render render
end end