diff --git a/.rubocop.yml b/.rubocop.yml index 7eb773e35..e11f5c153 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -52,7 +52,7 @@ Layout/EmptyLinesAroundBeginBody: Enabled: true Layout/EmptyLinesAroundBlockBody: - Enabled: false + Enabled: true Layout/EmptyLinesAroundClassBody: Enabled: false diff --git a/app/lib/siade/rna_adapter.rb b/app/lib/siade/rna_adapter.rb index 85893eff8..80580c336 100644 --- a/app/lib/siade/rna_adapter.rb +++ b/app/lib/siade/rna_adapter.rb @@ -12,7 +12,6 @@ class SIADE::RNAAdapter data_source[:association].each do |k, v| params[k] = v if attr_to_fetch.include?(k) - end params[:association_id] = params[:id] diff --git a/app/models/gestionnaire.rb b/app/models/gestionnaire.rb index 190b9502c..d010bdcf5 100644 --- a/app/models/gestionnaire.rb +++ b/app/models/gestionnaire.rb @@ -55,7 +55,6 @@ class Gestionnaire < ActiveRecord::Base PreferenceListDossier.available_columns_for(procedure_id).each do |table| table.second.each do |column| - if valid_couple_table_attr? table.first, column.first PreferenceListDossier.create( libelle: column.second[:libelle], diff --git a/config/initializers/apipie.rb b/config/initializers/apipie.rb index 92f93c63d..383abc409 100644 --- a/config/initializers/apipie.rb +++ b/config/initializers/apipie.rb @@ -14,5 +14,4 @@ Apipie.configure do |config| Description EOS - end diff --git a/config/routes.rb b/config/routes.rb index 8e2c90217..7aff0071f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,4 @@ Rails.application.routes.draw do - get "/ping" => "ping#index", :constraints => {:ip => /127.0.0.1/} devise_for :administrations, skip: [:password, :registrations] @@ -144,7 +143,6 @@ Rails.application.routes.draw do resource :accompagnateurs, only: [:show, :update] resource :previsualisation, only: [:show] - end namespace :accompagnateurs do diff --git a/db/migrate/20150623122513_create_entreprise.rb b/db/migrate/20150623122513_create_entreprise.rb index 319a3c962..fff62fd73 100644 --- a/db/migrate/20150623122513_create_entreprise.rb +++ b/db/migrate/20150623122513_create_entreprise.rb @@ -13,7 +13,6 @@ class CreateEntreprise < ActiveRecord::Migration t.integer :date_creation t.string :nom t.string :prenom - end add_reference :entreprises, :dossier, references: :dossiers end diff --git a/db/migrate/20160802113112_build_default_preference_list_dossier.rb b/db/migrate/20160802113112_build_default_preference_list_dossier.rb index d5fad79a4..a57a5cbfe 100644 --- a/db/migrate/20160802113112_build_default_preference_list_dossier.rb +++ b/db/migrate/20160802113112_build_default_preference_list_dossier.rb @@ -4,7 +4,6 @@ class BuildDefaultPreferenceListDossier < ActiveRecord::Migration PreferenceListDossier.available_columns.each do |table| table.second.each do |column| - if valid_couple_table_attr? table.first, column.first PreferenceListDossier.create( libelle: column.second[:libelle], diff --git a/db/migrate/20161007095443_reset_all_preference_list_dossier.rb b/db/migrate/20161007095443_reset_all_preference_list_dossier.rb index b137b1d8f..f4594bd5d 100644 --- a/db/migrate/20161007095443_reset_all_preference_list_dossier.rb +++ b/db/migrate/20161007095443_reset_all_preference_list_dossier.rb @@ -99,7 +99,6 @@ class ResetAllPreferenceListDossier < ActiveRecord::Migration PreferenceListDossier.available_columns_for(procedure_id).each do |table| table.second.each do |column| - if valid_couple_table_attr? table.first, column.first PreferenceListDossier.create( libelle: column.second[:libelle], diff --git a/db/migrate/20161221153929_create_notification.rb b/db/migrate/20161221153929_create_notification.rb index 745086412..b6158499e 100644 --- a/db/migrate/20161221153929_create_notification.rb +++ b/db/migrate/20161221153929_create_notification.rb @@ -1,14 +1,12 @@ class CreateNotification < ActiveRecord::Migration[5.0] def change create_table :notifications do |t| - t.boolean :already_read, default: false t.string :liste, array: true t.boolean :multiple, default: false t.string :type_notif t.datetime :created_at t.datetime :updated_at - end add_belongs_to :notifications, :dossier diff --git a/db/schema.rb b/db/schema.rb index 81476287a..0fd7a56a4 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,6 @@ # It's strongly recommended that you check this file into your version control system. ActiveRecord::Schema.define(version: 20170523092900) do - # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -475,5 +474,4 @@ ActiveRecord::Schema.define(version: 20170523092900) do LEFT JOIN individuals ON ((individuals.dossier_id = dossiers.id))) LEFT JOIN pieces_justificatives ON ((pieces_justificatives.dossier_id = dossiers.id))); SQL - end diff --git a/lib/tasks/cloud_storage.rake b/lib/tasks/cloud_storage.rake index d519d401b..06b8c836d 100644 --- a/lib/tasks/cloud_storage.rake +++ b/lib/tasks/cloud_storage.rake @@ -1,5 +1,4 @@ namespace :cloudstorage do - task init: :environment do os_config = (YAML.load_file(Fog.credentials_path))['default'] @os = OpenStack::Connection.create( @@ -109,5 +108,4 @@ namespace :cloudstorage do @cont.delete_object(object) unless last_modified.utc > (Time.now - 2.year).utc } end - end diff --git a/spec/controllers/admin/previsualisations_controller_spec.rb b/spec/controllers/admin/previsualisations_controller_spec.rb index 6ca5b8768..6d2adedad 100644 --- a/spec/controllers/admin/previsualisations_controller_spec.rb +++ b/spec/controllers/admin/previsualisations_controller_spec.rb @@ -12,5 +12,4 @@ describe Admin::PrevisualisationsController, type: :controller do subject { get :show, params: {procedure_id: procedure.id} } it { expect(subject.status).to eq(200) } end - end diff --git a/spec/controllers/admin/procedures_controller_spec.rb b/spec/controllers/admin/procedures_controller_spec.rb index 8702ed989..db036feed 100644 --- a/spec/controllers/admin/procedures_controller_spec.rb +++ b/spec/controllers/admin/procedures_controller_spec.rb @@ -54,7 +54,6 @@ describe Admin::ProceduresController, type: :controller do end describe 'DELETE #destroy' do - let(:procedure_draft) { create :procedure, published: false, archived: false } let(:procedure_published) { create :procedure, published: true, archived: false } let(:procedure_archived) { create :procedure, published: false, archived: true } @@ -150,7 +149,6 @@ describe Admin::ProceduresController, type: :controller do it { expect(subject.direction).to eq(direction) } it { expect(subject.lien_demarche).to eq(lien_demarche) } it { expect(subject.administrateur_id).to eq(admin.id) } - end describe 'procedure module api carto attributs in database' do @@ -278,7 +276,6 @@ describe Admin::ProceduresController, type: :controller do it { expect(subject.for_individual).not_to eq procedure_params[:for_individual] } it { expect(subject.individual_with_siret).not_to eq procedure_params[:individual_with_siret] } it { expect(subject.use_api_carto).not_to eq procedure_params[:module_api_carto_attributes][:use_api_carto] } - end end end @@ -465,7 +462,6 @@ describe Admin::ProceduresController, type: :controller do it { expect(body.first['mine']).to be_truthy } it { expect(body.second['label']).to eq(procedure2.path) } it { expect(body.second['mine']).to be_falsy } - end context 'filtered' do @@ -482,7 +478,6 @@ describe Admin::ProceduresController, type: :controller do end context 'when procedure is archived' do - before do procedure3.update_attribute :archived, true subject diff --git a/spec/controllers/administrations_controller_spec.rb b/spec/controllers/administrations_controller_spec.rb index 2481e327b..5ea846d1f 100644 --- a/spec/controllers/administrations_controller_spec.rb +++ b/spec/controllers/administrations_controller_spec.rb @@ -1,11 +1,9 @@ require 'spec_helper' describe AdministrationsController, type: :controller do - let(:administration) { create :administration } describe 'GET #index' do - subject { get :index } context 'when administration user is not connect' do @@ -13,7 +11,6 @@ describe AdministrationsController, type: :controller do end context 'when administration user is connect' do - before do sign_in administration end @@ -23,7 +20,6 @@ describe AdministrationsController, type: :controller do end describe 'POST #create' do - let(:email) { 'plop@plop.com' } let(:password) { 'password' } @@ -43,7 +39,6 @@ describe AdministrationsController, type: :controller do expect(NewAdminMailer).to receive(:deliver_now!) subject end - end context 'when email or password are missing' do diff --git a/spec/controllers/api/statistiques_spec.rb b/spec/controllers/api/statistiques_spec.rb index 0f3a85c39..fa04982ad 100644 --- a/spec/controllers/api/statistiques_spec.rb +++ b/spec/controllers/api/statistiques_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' describe API::StatistiquesController, type: :controller do describe '#GET dossiers_stats' do - before do get :dossiers_stats end diff --git a/spec/controllers/api/v1/dossiers_controller_spec.rb b/spec/controllers/api/v1/dossiers_controller_spec.rb index bcbf27315..809711108 100644 --- a/spec/controllers/api/v1/dossiers_controller_spec.rb +++ b/spec/controllers/api/v1/dossiers_controller_spec.rb @@ -95,7 +95,6 @@ describe API::V1::DossiersController do end context 'when procedure is found and belongs to current admin' do - context 'when dossier does not exist' do let(:procedure_id) { procedure.id } let(:dossier_id) { 99999 } diff --git a/spec/controllers/backoffice/avis_controller_spec.rb b/spec/controllers/backoffice/avis_controller_spec.rb index c1af9658b..33d635c97 100644 --- a/spec/controllers/backoffice/avis_controller_spec.rb +++ b/spec/controllers/backoffice/avis_controller_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe Backoffice::AvisController, type: :controller do - describe '#POST create' do let(:gestionnaire){ create(:gestionnaire) } let!(:dossier){ create(:dossier, state: 'received') } diff --git a/spec/controllers/backoffice/dossiers_controller_spec.rb b/spec/controllers/backoffice/dossiers_controller_spec.rb index 6a81f7f4c..b21bd6e32 100644 --- a/spec/controllers/backoffice/dossiers_controller_spec.rb +++ b/spec/controllers/backoffice/dossiers_controller_spec.rb @@ -346,7 +346,6 @@ describe Backoffice::DossiersController, type: :controller do it 'change state for updated' do expect(dossier.state).to eq 'updated' end - end describe 'flash alert' do diff --git a/spec/controllers/ban/search_controller_spec.rb b/spec/controllers/ban/search_controller_spec.rb index e51ef2a52..7fe454e19 100644 --- a/spec/controllers/ban/search_controller_spec.rb +++ b/spec/controllers/ban/search_controller_spec.rb @@ -16,7 +16,6 @@ describe Ban::SearchController, type: :controller do end context 'when request return nothing', vcr: {cassette_name: 'bano_search_nothing'} do - let (:request) { 'je recherche pas grand chose' } it { expect(response.status).to eq 200 } diff --git a/spec/controllers/cgu_controller_spec.rb b/spec/controllers/cgu_controller_spec.rb index c656c0ca1..710f6ddb2 100644 --- a/spec/controllers/cgu_controller_spec.rb +++ b/spec/controllers/cgu_controller_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' describe CguController, type: :controller do describe 'GET #index' do - subject { get :index } it { expect(subject.status).to eq 200 } diff --git a/spec/controllers/demo_controller_spec.rb b/spec/controllers/demo_controller_spec.rb index 4411a2848..5e9ef92e9 100644 --- a/spec/controllers/demo_controller_spec.rb +++ b/spec/controllers/demo_controller_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' describe DemoController, type: :controller do describe 'GET #index' do - subject { get :index } it { expect(subject.status).to eq 200 } diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb index 9f6d38d81..9577aca7c 100644 --- a/spec/controllers/invites_controller_spec.rb +++ b/spec/controllers/invites_controller_spec.rb @@ -41,7 +41,6 @@ describe InvitesController, type: :controller do it { expect(invite.user).to eq user } it { expect(flash[:notice]).to be_present } - end context 'when email is not assign to an user' do diff --git a/spec/controllers/ping_controller_spec.rb b/spec/controllers/ping_controller_spec.rb index 91a05ee16..1c723512c 100644 --- a/spec/controllers/ping_controller_spec.rb +++ b/spec/controllers/ping_controller_spec.rb @@ -2,13 +2,11 @@ require 'spec_helper' describe PingController, type: :controller do describe 'GET #index' do - subject { get :index } it { expect(subject.status).to eq 200 } context 'when base is un-plug' do - before do allow(ActiveRecord::Base).to receive(:connected?).and_return(false) end diff --git a/spec/controllers/root_controller_spec.rb b/spec/controllers/root_controller_spec.rb index 3109f46ef..4ea5e837b 100644 --- a/spec/controllers/root_controller_spec.rb +++ b/spec/controllers/root_controller_spec.rb @@ -64,7 +64,6 @@ describe RootController, type: :controller do end it { expect(response.body).to have_css('.landing') } - end context "unified login" do @@ -78,5 +77,4 @@ describe RootController, type: :controller do expect(response.body).to have_css("a[href='#{new_user_session_path}']") end end - end diff --git a/spec/controllers/users/carte_controller_shared_example.rb b/spec/controllers/users/carte_controller_shared_example.rb index 5208fc3e7..dff16acca 100644 --- a/spec/controllers/users/carte_controller_shared_example.rb +++ b/spec/controllers/users/carte_controller_shared_example.rb @@ -179,7 +179,6 @@ shared_examples 'carte_controller_spec' do end describe '#get_position' do - context 'when etablissement is nil' do before do dossier.update etablissement: nil diff --git a/spec/controllers/users/description_controller_shared_example.rb b/spec/controllers/users/description_controller_shared_example.rb index 9a73c5735..3d3a71114 100644 --- a/spec/controllers/users/description_controller_shared_example.rb +++ b/spec/controllers/users/description_controller_shared_example.rb @@ -87,7 +87,6 @@ shared_examples 'description_controller_spec' do context 'when dossier does not have an enterprise datas' do before do - end it { expect(dossier.entreprise).to be_nil } diff --git a/spec/controllers/users/dossiers/add_siret_controller_spec.rb b/spec/controllers/users/dossiers/add_siret_controller_spec.rb index 45962c0fc..2481fd480 100644 --- a/spec/controllers/users/dossiers/add_siret_controller_spec.rb +++ b/spec/controllers/users/dossiers/add_siret_controller_spec.rb @@ -2,7 +2,6 @@ require 'spec_helper' describe Users::Dossiers::AddSiretController, type: :controller do describe '#GET show' do - let(:dossier) { create :dossier } before do diff --git a/spec/controllers/users/dossiers/commentaires_controller_spec.rb b/spec/controllers/users/dossiers/commentaires_controller_spec.rb index f83943979..1fd067919 100644 --- a/spec/controllers/users/dossiers/commentaires_controller_spec.rb +++ b/spec/controllers/users/dossiers/commentaires_controller_spec.rb @@ -5,7 +5,6 @@ describe Users::Dossiers::CommentairesController, type: :controller do let(:texte_commentaire) { 'Commentaire de test' } describe '#POST create' do - subject { post :create, params:{dossier_id: dossier.id, texte_commentaire: texte_commentaire} dossier.reload @@ -42,7 +41,6 @@ describe Users::Dossiers::CommentairesController, type: :controller do expect(NotificationMailer).to_not receive(:new_answer) subject end - end end end diff --git a/spec/controllers/users/dossiers_controller_spec.rb b/spec/controllers/users/dossiers_controller_spec.rb index 458db571f..01c8f79a2 100644 --- a/spec/controllers/users/dossiers_controller_spec.rb +++ b/spec/controllers/users/dossiers_controller_spec.rb @@ -66,7 +66,6 @@ describe Users::DossiersController, type: :controller do it { expect { subject }.to change(Dossier, :count).by 1 } describe 'save user siret' do - context 'when user have not a saved siret' do context 'when siret is present on request' do subject { get :new, params: {procedure_id: procedure_id, siret: siret} } @@ -349,7 +348,6 @@ describe Users::DossiersController, type: :controller do end it { expect(response.status).to eq 200 } - end end @@ -456,7 +454,6 @@ describe Users::DossiersController, type: :controller do it { expect { subject }.to change { Dossier.count }.by(0) } end - end describe 'PUT #change_siret' do diff --git a/spec/controllers/users/recapitulatif_controller_spec.rb b/spec/controllers/users/recapitulatif_controller_spec.rb index 06b63f1ea..120e2e344 100644 --- a/spec/controllers/users/recapitulatif_controller_spec.rb +++ b/spec/controllers/users/recapitulatif_controller_spec.rb @@ -33,7 +33,6 @@ describe Users::RecapitulatifController, type: :controller do it { is_expected.to redirect_to root_path } end end - end describe 'POST #initiate' do diff --git a/spec/controllers/users/registrations_controller_spec.rb b/spec/controllers/users/registrations_controller_spec.rb index e65f10a98..324995ca3 100644 --- a/spec/controllers/users/registrations_controller_spec.rb +++ b/spec/controllers/users/registrations_controller_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe Users::RegistrationsController, type: :controller do - let(:email) { 'test@octo.com' } let(:password) { 'password' } diff --git a/spec/controllers/users/sessions_controller_spec.rb b/spec/controllers/users/sessions_controller_spec.rb index b4e916edb..cc0570193 100644 --- a/spec/controllers/users/sessions_controller_spec.rb +++ b/spec/controllers/users/sessions_controller_spec.rb @@ -83,7 +83,6 @@ describe Users::SessionsController, type: :controller do end it 'signs user + gestionnaire + administrateur in' do - post :create, params: {user: {email: administrateur.email, password: administrateur.password}} expect(@response.redirect?).to be(true) expect(subject.current_user).to eq(user) @@ -200,7 +199,6 @@ describe Users::SessionsController, type: :controller do expect(subject.current_administrateur).to be(nil) end end - end end diff --git a/spec/decorators/procedure_decorator_spec.rb b/spec/decorators/procedure_decorator_spec.rb index 26540d80f..4c61964f5 100644 --- a/spec/decorators/procedure_decorator_spec.rb +++ b/spec/decorators/procedure_decorator_spec.rb @@ -25,5 +25,4 @@ describe ProcedureDecorator do it { expect(subject.quartiers_prioritaires).to be_falsey } it { expect(subject.cadastre).to be_falsey } end - end diff --git a/spec/decorators/procedures_decorator_spec.rb b/spec/decorators/procedures_decorator_spec.rb index e298b1180..1ad516042 100644 --- a/spec/decorators/procedures_decorator_spec.rb +++ b/spec/decorators/procedures_decorator_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe ProceduresDecorator do - before do create(:procedure, :published, created_at: Time.new(2015, 12, 24, 14, 10)) create(:procedure, :published, created_at: Time.new(2015, 12, 24, 14, 10)) diff --git a/spec/decorators/type_de_champ_decorator_spec.rb b/spec/decorators/type_de_champ_decorator_spec.rb index 223ca6cf3..0a6ac784a 100644 --- a/spec/decorators/type_de_champ_decorator_spec.rb +++ b/spec/decorators/type_de_champ_decorator_spec.rb @@ -9,7 +9,6 @@ describe TypeDeChampDecorator do let!(:type_de_champ_2) { create(:type_de_champ_public, procedure: procedure, order_place: 2) } describe '#button_up' do - describe 'with first piece justificative' do let(:index) { 0 } subject { type_de_champ_0.decorate } @@ -50,5 +49,4 @@ describe TypeDeChampDecorator do end end end - end diff --git a/spec/decorators/type_de_piece_justificative_decorator_spec.rb b/spec/decorators/type_de_piece_justificative_decorator_spec.rb index cbe3d6704..5503b68a0 100644 --- a/spec/decorators/type_de_piece_justificative_decorator_spec.rb +++ b/spec/decorators/type_de_piece_justificative_decorator_spec.rb @@ -9,7 +9,6 @@ describe TypeDePieceJustificativeDecorator do let!(:type_de_piece_justificative_2) { create(:type_de_piece_justificative, procedure: procedure, order_place: 2) } describe '#button_up' do - describe 'with first piece justificative' do let(:index) { 0 } subject { type_de_piece_justificative_0.decorate } diff --git a/spec/facades/dossiers_list_facades_spec.rb b/spec/facades/dossiers_list_facades_spec.rb index 0a9c7a0d3..08ca0c878 100644 --- a/spec/facades/dossiers_list_facades_spec.rb +++ b/spec/facades/dossiers_list_facades_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe DossiersListFacades do - let(:gestionnaire) { create :gestionnaire } let(:procedure) { create :procedure, libelle: 'Ma procédure' } let(:procedure_2) { create :procedure, libelle: 'Ma seconde procédure' } @@ -27,7 +26,6 @@ describe DossiersListFacades do end describe '#preference_list_dossiers_filter' do - subject { facade.preference_list_dossiers_filter } context 'when procedure is not pasted at the facade' do diff --git a/spec/factories/champ.rb b/spec/factories/champ.rb index 3a2302f4c..630e787ba 100644 --- a/spec/factories/champ.rb +++ b/spec/factories/champ.rb @@ -1,6 +1,5 @@ FactoryGirl.define do factory :champ do - type_de_champ { FactoryGirl.create(:type_de_champ_public) } end end diff --git a/spec/factories/dossier.rb b/spec/factories/dossier.rb index 415e1d58d..f53eeb0f6 100644 --- a/spec/factories/dossier.rb +++ b/spec/factories/dossier.rb @@ -42,7 +42,6 @@ FactoryGirl.define do trait :with_cerfa_upload do after(:build) do |dossier, _evaluator| - dossier.cerfa << create(:cerfa) end end diff --git a/spec/factories/type_de_piece_justificative.rb b/spec/factories/type_de_piece_justificative.rb index 36084ab39..76af4cf37 100644 --- a/spec/factories/type_de_piece_justificative.rb +++ b/spec/factories/type_de_piece_justificative.rb @@ -1,6 +1,5 @@ FactoryGirl.define do factory :type_de_piece_justificative do - libelle 'RIB' description 'Releve identité bancaire' diff --git a/spec/features/admin/add_type_de_champ_spec.rb b/spec/features/admin/add_type_de_champ_spec.rb index adbf661f9..77e0f446b 100644 --- a/spec/features/admin/add_type_de_champ_spec.rb +++ b/spec/features/admin/add_type_de_champ_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'add a new type de champs', js: true do - let(:administrateur) { create(:administrateur) } let(:procedure) { create(:procedure, administrateur: administrateur) } diff --git a/spec/features/admin/connection_spec.rb b/spec/features/admin/connection_spec.rb index f485b0715..4eb5236e4 100644 --- a/spec/features/admin/connection_spec.rb +++ b/spec/features/admin/connection_spec.rb @@ -58,6 +58,5 @@ feature 'Administrator connection' do end end end - end end diff --git a/spec/features/admin/procedure_cloning_spec.rb b/spec/features/admin/procedure_cloning_spec.rb index 78e13045a..15530b161 100644 --- a/spec/features/admin/procedure_cloning_spec.rb +++ b/spec/features/admin/procedure_cloning_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'As an administrateur I wanna clone a procedure', js: true do - let(:administrateur) { create(:administrateur) } before do @@ -10,7 +9,6 @@ feature 'As an administrateur I wanna clone a procedure', js: true do end context 'Cloning procedure' do - before 'Create procedure' do page.find_by_id('new-procedure').click fill_in 'procedure_libelle', with: 'libelle de la procedure' diff --git a/spec/features/admin/procedure_creation_spec.rb b/spec/features/admin/procedure_creation_spec.rb index 8e14bd43a..987030e7c 100644 --- a/spec/features/admin/procedure_creation_spec.rb +++ b/spec/features/admin/procedure_creation_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'As an administrateur I wanna create a new procedure', js: true do - let(:administrateur) { create(:administrateur) } before do @@ -10,7 +9,6 @@ feature 'As an administrateur I wanna create a new procedure', js: true do end context 'Right after sign_in I shall see all procedure states links' do - scenario 'Finding draft procedures' do page.find_by_id('draft-procedures').trigger('click') expect(page).to have_current_path(admin_procedures_draft_path, only_path: true) @@ -28,7 +26,6 @@ feature 'As an administrateur I wanna create a new procedure', js: true do end context 'Creating a new procedure' do - scenario 'Finding new procedure link' do page.find_by_id('new-procedure').click expect(page).to have_current_path(new_admin_procedure_path, only_path: true) diff --git a/spec/features/admin/procedure_locked_spec.rb b/spec/features/admin/procedure_locked_spec.rb index 12961e56c..2a89232b0 100644 --- a/spec/features/admin/procedure_locked_spec.rb +++ b/spec/features/admin/procedure_locked_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'procedure locked' do - let(:administrateur) { create(:administrateur) } let(:published) { false } let(:procedure) { create(:procedure, administrateur: administrateur, published: published) } diff --git a/spec/features/backoffice/index_show_procedure_spec.rb b/spec/features/backoffice/index_show_procedure_spec.rb index d24910eca..ef0eade1a 100644 --- a/spec/features/backoffice/index_show_procedure_spec.rb +++ b/spec/features/backoffice/index_show_procedure_spec.rb @@ -20,7 +20,6 @@ feature 'As an Accompagnateur I can navigate and use each functionnality around end context 'On index' do - scenario 'Switching between procedures' do page.all('#procedure-list a').first.click expect(page).to have_current_path(backoffice_dossiers_procedure_path(id: procedure_1.id.to_s), only_path: true) diff --git a/spec/features/backoffice/lateral_page_pref_list_dossier_backoffice_spec.rb b/spec/features/backoffice/lateral_page_pref_list_dossier_backoffice_spec.rb index 9a36bf116..9e7ff7289 100644 --- a/spec/features/backoffice/lateral_page_pref_list_dossier_backoffice_spec.rb +++ b/spec/features/backoffice/lateral_page_pref_list_dossier_backoffice_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'usage of pref list dossier lateral panel', js: true do - let(:administrateur) { create(:administrateur) } let(:gestionnaire) { create(:gestionnaire, administrateurs: [administrateur]) } let(:procedure) { create(:procedure, administrateur: administrateur) } diff --git a/spec/features/backoffice/lateral_page_pref_list_dossier_by_procedure_backoffice_spec.rb b/spec/features/backoffice/lateral_page_pref_list_dossier_by_procedure_backoffice_spec.rb index 9ed134a75..21f5e1801 100644 --- a/spec/features/backoffice/lateral_page_pref_list_dossier_by_procedure_backoffice_spec.rb +++ b/spec/features/backoffice/lateral_page_pref_list_dossier_by_procedure_backoffice_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'usage of pref list dossier lateral panel by procedure', js: true do - let(:administrateur) { create(:administrateur) } let(:gestionnaire) { create(:gestionnaire, administrateurs: [administrateur]) } let(:procedure) { create(:procedure, :with_type_de_champ, administrateur: administrateur) } diff --git a/spec/features/france_connect/france_connect_particulier_spec.rb b/spec/features/france_connect/france_connect_particulier_spec.rb index 781e35b6c..6889ef454 100644 --- a/spec/features/france_connect/france_connect_particulier_spec.rb +++ b/spec/features/france_connect/france_connect_particulier_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'France Connect Particulier Connexion' do - let(:code) { 'plop' } let(:given_name) { 'titi' } let(:family_name) { 'toto' } @@ -21,7 +20,6 @@ feature 'France Connect Particulier Connexion' do } context 'when user is on login page' do - before do visit new_user_session_path end diff --git a/spec/features/users/dossier_edition_spec.rb b/spec/features/users/dossier_edition_spec.rb index 5aca700d9..238a7c3d9 100644 --- a/spec/features/users/dossier_edition_spec.rb +++ b/spec/features/users/dossier_edition_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'As a User I want to edit a dossier I own' do - let(:user) { create(:user) } let(:procedure_for_individual) { create(:procedure, :published, :for_individual, :with_type_de_champ, :with_two_type_de_piece_justificative, :with_dossier_link) } let!(:dossier) { create(:dossier, :with_entreprise, :for_individual, :with_dossier_link, procedure: procedure_for_individual, user: user, autorisation_donnees: true, state: 'initiated') } @@ -12,7 +11,6 @@ feature 'As a User I want to edit a dossier I own' do end context 'After sign_in, I can navigate through dossiers indexes and edit a dossier' do - scenario 'After sign_in, I can see dossiers "à traiter" (default), and other indexes' do expect(page.find('#a_traiter')['class'] ).to eq('active procedure-list-element') page.find_by_id('brouillon').click diff --git a/spec/features/users/dossier_index_spec.rb b/spec/features/users/dossier_index_spec.rb index 913efcf79..dc696a9ad 100644 --- a/spec/features/users/dossier_index_spec.rb +++ b/spec/features/users/dossier_index_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' feature 'As a User I want to sort and paginate dossiers', js: true do - let(:user) { create(:user) } let(:procedure_for_individual) { create(:procedure, :published, :for_individual) } @@ -21,7 +20,6 @@ feature 'As a User I want to sort and paginate dossiers', js: true do end context 'After sign_in, I can see my 51 dossiers on the index' do - scenario 'Using sort' do visit "/users/dossiers?dossiers_smart_listing[sort][id]=asc" expect(page.all(:css, '#dossiers-list tr')[1].text.split(" ").first).to eq(user.dossiers.first.id.to_s) @@ -50,5 +48,4 @@ feature 'As a User I want to sort and paginate dossiers', js: true do expect(page.all(:css, '#dossiers-list tr')[1].text.split(" ").first).to eq((user.dossiers.first.id).to_s) end end - end diff --git a/spec/lib/carto/geo_api/driver_spec.rb b/spec/lib/carto/geo_api/driver_spec.rb index 417bf0ba9..4d13c15ca 100644 --- a/spec/lib/carto/geo_api/driver_spec.rb +++ b/spec/lib/carto/geo_api/driver_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe Carto::GeoAPI::Driver do - describe '.regions', vcr: {cassette_name: 'geoapi_regions'} do subject { described_class.regions } @@ -18,7 +17,6 @@ describe Carto::GeoAPI::Driver do subject { described_class.pays } it { is_expected.to eq File.open('app/lib/carto/geo_api/pays.json').read } - end describe 'departements_url' do diff --git a/spec/mailers/avis_mailer_spec.rb b/spec/mailers/avis_mailer_spec.rb index 83673e899..0d9820d32 100644 --- a/spec/mailers/avis_mailer_spec.rb +++ b/spec/mailers/avis_mailer_spec.rb @@ -9,6 +9,5 @@ RSpec.describe AvisMailer, type: :mailer do it { expect(subject.subject).to eq("Donnez votre avis sur le dossier nº #{avis.dossier.id} (#{avis.dossier.procedure.libelle})") } it { expect(subject.body).to include("Vous avez été invité par #{avis.claimant.email} à donner votre avis sur le dossier nº #{avis.dossier.id} de la procédure : #{avis.dossier.procedure.libelle}.") } it { expect(subject.body).to include(avis.introduction) } - end end diff --git a/spec/models/dossier_spec.rb b/spec/models/dossier_spec.rb index ac668ee64..ee164c385 100644 --- a/spec/models/dossier_spec.rb +++ b/spec/models/dossier_spec.rb @@ -262,7 +262,6 @@ describe Dossier do it { is_expected.to eq 'replied' } end - end end @@ -295,7 +294,6 @@ describe Dossier do it { is_expected.to eq('replied') } end - end end @@ -661,7 +659,6 @@ describe Dossier do it { expect(subject.second.type_de_champ.libelle).to eq 'type_2_2' } it { expect(subject.last.type_de_champ.libelle).to eq 'type_2_3' } end - end describe '#ordered_champs_private' do @@ -850,7 +847,6 @@ describe Dossier do it_behaves_like 'dossier is processed', 'without_continuation' end - end describe '.downloadable' do diff --git a/spec/models/drop_down_list_spec.rb b/spec/models/drop_down_list_spec.rb index b065dace9..712e76d59 100644 --- a/spec/models/drop_down_list_spec.rb +++ b/spec/models/drop_down_list_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe DropDownList do - describe 'database columns' do it { is_expected.to have_db_column(:value) } end @@ -24,7 +23,6 @@ Pilotage / Ingénierie context 'when one value is empty' do let(:value) { "Cohésion sociale - Cadre de vie / Urb. Pilotage / Ingénierie " diff --git a/spec/models/etablissement_spec.rb b/spec/models/etablissement_spec.rb index 6097cac9c..802672340 100644 --- a/spec/models/etablissement_spec.rb +++ b/spec/models/etablissement_spec.rb @@ -23,7 +23,6 @@ describe Etablissement do end describe '#geo_adresse' do - let(:etablissement) { create(:etablissement) } subject { etablissement.geo_adresse } diff --git a/spec/models/gestionnaire_spec.rb b/spec/models/gestionnaire_spec.rb index 8b85128d4..dc2679604 100644 --- a/spec/models/gestionnaire_spec.rb +++ b/spec/models/gestionnaire_spec.rb @@ -103,7 +103,6 @@ describe Gestionnaire, type: :model do subject { gestionnaire.follow? dossier.id } context 'when gestionnaire follow a dossier' do - before do create :follow, dossier_id: dossier.id, gestionnaire_id: gestionnaire.id end diff --git a/spec/models/invite_spec.rb b/spec/models/invite_spec.rb index 29b53f41a..e6c637d69 100644 --- a/spec/models/invite_spec.rb +++ b/spec/models/invite_spec.rb @@ -32,7 +32,6 @@ describe Invite do end it { expect{ subject }.to raise_error ActiveRecord::RecordInvalid } - end end end diff --git a/spec/models/piece_justificative_spec.rb b/spec/models/piece_justificative_spec.rb index 70abcb299..62da2cd96 100644 --- a/spec/models/piece_justificative_spec.rb +++ b/spec/models/piece_justificative_spec.rb @@ -13,7 +13,6 @@ describe PieceJustificative do it { is_expected.to belong_to(:type_de_piece_justificative) } it { is_expected.to belong_to(:user) } it { is_expected.to have_one(:commentaire) } - end describe 'validations' do diff --git a/spec/models/preference_list_dossier_spec.rb b/spec/models/preference_list_dossier_spec.rb index cba6265a3..9ddb467f5 100644 --- a/spec/models/preference_list_dossier_spec.rb +++ b/spec/models/preference_list_dossier_spec.rb @@ -190,7 +190,6 @@ describe PreferenceListDossier do it { expect(subject[:order]).to be_nil } it { expect(subject[:filter]).to be_nil } end - end describe 'etablissement' do diff --git a/spec/models/procedure_path_spec.rb b/spec/models/procedure_path_spec.rb index dfb268291..6f4565fd3 100644 --- a/spec/models/procedure_path_spec.rb +++ b/spec/models/procedure_path_spec.rb @@ -46,5 +46,4 @@ describe ProcedurePath do end end end - end diff --git a/spec/models/procedure_spec.rb b/spec/models/procedure_spec.rb index a9e3f2185..067ca981e 100644 --- a/spec/models/procedure_spec.rb +++ b/spec/models/procedure_spec.rb @@ -175,7 +175,6 @@ describe Procedure do subject.types_de_piece_justificative.zip(procedure.types_de_piece_justificative).each do |stc, ptc| expect(stc).to have_same_attributes_as(ptc) end - end it 'should duplicate existing mail_templates' do @@ -244,7 +243,6 @@ describe Procedure do end describe 'total_dossier' do - let(:procedure) { create :procedure } before do diff --git a/spec/models/quartier_prioritaire_spec.rb b/spec/models/quartier_prioritaire_spec.rb index 30c52cd47..6295ad74e 100644 --- a/spec/models/quartier_prioritaire_spec.rb +++ b/spec/models/quartier_prioritaire_spec.rb @@ -9,7 +9,6 @@ describe QuartierPrioritaire do it { is_expected.to belong_to(:dossier) } describe 'geometry' do - let(:qp) { create :quartier_prioritaire, geometry: qp_geometry } let(:qp_geometry) { File.open('spec/support/files/qp_geometry_value.txt').read } diff --git a/spec/models/siret_spec.rb b/spec/models/siret_spec.rb index 3b81bf51b..c5d197660 100644 --- a/spec/models/siret_spec.rb +++ b/spec/models/siret_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe Siret, type: :model do - let(:valid_siret) { '41816609600051' } let(:invalid_siret) { '111111111' } diff --git a/spec/models/type_de_champ_shared_example.rb b/spec/models/type_de_champ_shared_example.rb index c1b37a8f6..3ed2e0f0c 100644 --- a/spec/models/type_de_champ_shared_example.rb +++ b/spec/models/type_de_champ_shared_example.rb @@ -43,7 +43,6 @@ shared_examples 'type_de_champ_spec' do end describe 'field_for_list?' do - let(:type_de_champ_yes) { create :type_de_champ_public, type_champ: 'text' } let(:type_de_champ_no_1) { create :type_de_champ_public, type_champ: 'textarea' } let(:type_de_champ_no_2) { create :type_de_champ_public, type_champ: 'header_section' } diff --git a/spec/models/type_de_champ_spec.rb b/spec/models/type_de_champ_spec.rb index 702b8d64f..e7eb763f5 100644 --- a/spec/models/type_de_champ_spec.rb +++ b/spec/models/type_de_champ_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe TypeDeChamp do - require 'models/type_de_champ_shared_example' it_should_behave_like "type_de_champ_spec" diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 8cac2f476..552d42bca 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -16,7 +16,6 @@ describe User, type: :model do it { is_expected.to have_db_column(:updated_at) } it { is_expected.to have_db_column(:siret) } it { is_expected.to have_db_column(:loged_in_with_france_connect) } - end describe 'associations' do it { is_expected.to have_many(:dossiers) } diff --git a/spec/serializers/dossier_table_export_serializer_spec.rb b/spec/serializers/dossier_table_export_serializer_spec.rb index 3373ecbed..0dcd1598e 100644 --- a/spec/serializers/dossier_table_export_serializer_spec.rb +++ b/spec/serializers/dossier_table_export_serializer_spec.rb @@ -1,9 +1,7 @@ require 'spec_helper' describe DossierTableExportSerializer do - describe '#emails_accompagnateurs' do - let(:gestionnaire){ create(:gestionnaire) } let(:follow) { create(:follow, gestionnaire: gestionnaire) } @@ -28,7 +26,5 @@ describe DossierTableExportSerializer do it { is_expected.to eq "#{gestionnaire.email} #{gestionnaire2.email}" } end - end - end diff --git a/spec/services/accompagnateur_service_spec.rb b/spec/services/accompagnateur_service_spec.rb index 0d01b9f29..eb01bfd54 100644 --- a/spec/services/accompagnateur_service_spec.rb +++ b/spec/services/accompagnateur_service_spec.rb @@ -1,14 +1,12 @@ require 'spec_helper' describe AccompagnateurService do - let(:procedure) { create :procedure } let(:accompagnateur) { create :gestionnaire } let(:accompagnateur_service) { AccompagnateurService.new accompagnateur, procedure, to} describe '#change_assignement!' do - subject { accompagnateur_service.change_assignement! } context 'when accompagnateur is not assign at the procedure' do @@ -34,7 +32,6 @@ describe AccompagnateurService do end describe '#build_default_column' do - subject { accompagnateur_service.build_default_column } context 'when to is not assign' do diff --git a/spec/services/dossiers_list_gestionnaire_service_spec.rb b/spec/services/dossiers_list_gestionnaire_service_spec.rb index de32a0aa9..3af0796b9 100644 --- a/spec/services/dossiers_list_gestionnaire_service_spec.rb +++ b/spec/services/dossiers_list_gestionnaire_service_spec.rb @@ -24,7 +24,6 @@ describe DossiersListGestionnaireService do end context 'when gestionnaire have default sort' do - before do preference_attr.update_column(:order, 'asc') end @@ -74,7 +73,6 @@ describe DossiersListGestionnaireService do it { expect(select_preference_list_dossier.order).to eq 'desc' } end - end context 'when procedure as already a preference order' do @@ -128,7 +126,6 @@ describe DossiersListGestionnaireService do end describe '#join_filter' do - subject { DossiersListGestionnaireService.new(gestionnaire, liste, nil).joins_filter } it { is_expected.to eq []} @@ -180,7 +177,6 @@ describe DossiersListGestionnaireService do it { is_expected.to eq "CAST(dossiers.id as TEXT) LIKE '%23%' AND CAST(entreprises.raison_sociale as TEXT) LIKE '%plop%'" } context 'when last filter caractere is *' do - before do gestionnaire.preference_list_dossiers .find_by(table: 'entreprise', attr: 'raison_sociale', procedure: nil) @@ -242,7 +238,6 @@ describe DossiersListGestionnaireService do 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%'" } - end end diff --git a/spec/services/notification_service_spec.rb b/spec/services/notification_service_spec.rb index 6a6cc4762..6368b3eb7 100644 --- a/spec/services/notification_service_spec.rb +++ b/spec/services/notification_service_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe NotificationService do - describe '.notify' do let(:dossier) { create :dossier } let(:service) { described_class.new type_notif, dossier.id } diff --git a/spec/services/previsualisation_service_spec.rb b/spec/services/previsualisation_service_spec.rb index 81f84e5ab..64bd03735 100644 --- a/spec/services/previsualisation_service_spec.rb +++ b/spec/services/previsualisation_service_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe PrevisualisationService do - describe '.destroy_all_champs' do subject { described_class.destroy_all_champs dossier } diff --git a/spec/services/user_routes_authorization_service_spec.rb b/spec/services/user_routes_authorization_service_spec.rb index 231e4685b..4bbb7d825 100644 --- a/spec/services/user_routes_authorization_service_spec.rb +++ b/spec/services/user_routes_authorization_service_spec.rb @@ -43,7 +43,6 @@ describe UserRoutesAuthorizationService do let(:controller) { Users::CarteController } context 'when use_api_carto is false' do - describe 'draft' do let(:state) { 'draft' } it { is_expected.to be_falsey } diff --git a/spec/support/database_cleaner.rb b/spec/support/database_cleaner.rb index 9bbfc5c99..fba37f056 100644 --- a/spec/support/database_cleaner.rb +++ b/spec/support/database_cleaner.rb @@ -1,5 +1,4 @@ RSpec.configure do |config| - expect_list = %w() config.before(:suite) do diff --git a/spec/uploaders/base_uploader_spec.rb b/spec/uploaders/base_uploader_spec.rb index d3c9b1f2e..10b0033b0 100644 --- a/spec/uploaders/base_uploader_spec.rb +++ b/spec/uploaders/base_uploader_spec.rb @@ -4,7 +4,6 @@ describe BaseUploader do let(:uploader) { described_class.new } describe '#cache_dir' do - subject { uploader.cache_dir } context 'when rails env is not production' do diff --git a/spec/uploaders/remote_downloader_spec.rb b/spec/uploaders/remote_downloader_spec.rb index 0f0629ee3..1eee1d6c2 100644 --- a/spec/uploaders/remote_downloader_spec.rb +++ b/spec/uploaders/remote_downloader_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe RemoteDownloader do - let(:filename) { 'file_name.pdf' } subject { described_class.new filename } diff --git a/spec/views/admin/previsualisations/show.html.haml_spec.rb b/spec/views/admin/previsualisations/show.html.haml_spec.rb index ffca23efe..0677ee177 100644 --- a/spec/views/admin/previsualisations/show.html.haml_spec.rb +++ b/spec/views/admin/previsualisations/show.html.haml_spec.rb @@ -127,6 +127,5 @@ describe 'admin/previsualisations/show.html.haml', type: :view do context 'when dossier not have cerfa, piece justificative and demarche link' do it { expect(rendered).not_to have_content 'Documents administratifs' } end - end end diff --git a/spec/views/admin/procedures/show.html.haml_spec.rb b/spec/views/admin/procedures/show.html.haml_spec.rb index d974cac37..714b5151d 100644 --- a/spec/views/admin/procedures/show.html.haml_spec.rb +++ b/spec/views/admin/procedures/show.html.haml_spec.rb @@ -23,7 +23,6 @@ describe 'admin/procedures/show.html.haml', type: :view do end context 'when procedure have a gestionnare affected' do - before do create :assign_to, gestionnaire: create(:gestionnaire), procedure: procedure render @@ -76,7 +75,5 @@ describe 'admin/procedures/show.html.haml', type: :view do describe 'procedure link is present' do it { expect(rendered).to have_content(commencer_url(procedure_path: procedure.path)) } end - end - end diff --git a/spec/views/layouts/_navbar_spec.rb b/spec/views/layouts/_navbar_spec.rb index a23f67cae..448456d4f 100644 --- a/spec/views/layouts/_navbar_spec.rb +++ b/spec/views/layouts/_navbar_spec.rb @@ -7,7 +7,6 @@ describe 'layouts/_navbar.html.haml', type: :view do let!(:procedure) { create(:procedure, administrateur: administrateur) } describe 'navbar entries' do - context 'when disconnected' do before do render @@ -39,6 +38,5 @@ describe 'layouts/_navbar.html.haml', type: :view do subject { rendered } it { is_expected.to match(/Déconnexion/) } end - end end diff --git a/spec/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_show_spec.rb b/spec/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_show_spec.rb index 308acb09c..cd91a032c 100644 --- a/spec/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_show_spec.rb +++ b/spec/views/layouts/left_panels/_left_panel_backoffice_dossierscontroller_show_spec.rb @@ -1,7 +1,6 @@ require 'spec_helper' describe 'layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.html.haml', type: :view do - let!(:dossier) { create(:dossier, :with_entreprise, state: state, archived: archived) } let(:state) { 'draft' } let(:archived) { false } @@ -25,7 +24,6 @@ describe 'layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.htm end context 'button dossier state changements' do - shared_examples 'button Passer en instruction is present' do it { expect(rendered).to have_link('Passer en instruction') } end @@ -149,8 +147,6 @@ describe 'layouts/left_panels/_left_panel_backoffice_dossierscontroller_show.htm it { expect(rendered).to have_content('Archivé') } it { expect(rendered).to have_link('Désarchiver') } - end end - end diff --git a/spec/views/layouts/left_panels/_left_panel_users_recapitulatifcontroller_show_spec.rb b/spec/views/layouts/left_panels/_left_panel_users_recapitulatifcontroller_show_spec.rb index 7996e3d1f..f580715a9 100644 --- a/spec/views/layouts/left_panels/_left_panel_users_recapitulatifcontroller_show_spec.rb +++ b/spec/views/layouts/left_panels/_left_panel_users_recapitulatifcontroller_show_spec.rb @@ -82,5 +82,4 @@ describe 'layouts/left_panels/_left_panel_users_recapitulatifcontroller_show.htm end end end - end diff --git a/spec/views/users/description/show.html.haml_spec.rb b/spec/views/users/description/show.html.haml_spec.rb index c278c09f1..1e35f5d5b 100644 --- a/spec/views/users/description/show.html.haml_spec.rb +++ b/spec/views/users/description/show.html.haml_spec.rb @@ -124,6 +124,5 @@ describe 'users/description/show.html.haml', type: :view do context 'when dossier not have cerfa, piece justificative and demarche link' do it { expect(rendered).not_to have_content 'Documents administratifs' } end - end end diff --git a/spec/views/users/recapitulatif/show.html.haml_spec.rb b/spec/views/users/recapitulatif/show.html.haml_spec.rb index ccef84120..7761bca13 100644 --- a/spec/views/users/recapitulatif/show.html.haml_spec.rb +++ b/spec/views/users/recapitulatif/show.html.haml_spec.rb @@ -69,11 +69,9 @@ describe 'users/recapitulatif/show.html.haml', type: :view do expect(rendered).to have_content('Modifier les documents') expect(rendered).to have_css('#upload-pj-modal') end - end context 'when invite is logged' do - context 'when invite is by Gestionnaire' do let!(:invite_user) { create(:user, email: 'invite@octo.com') } diff --git a/spec/workers/auto_archive_procedure_worker_spec.rb b/spec/workers/auto_archive_procedure_worker_spec.rb index 2a30fa764..6e0743477 100644 --- a/spec/workers/auto_archive_procedure_worker_spec.rb +++ b/spec/workers/auto_archive_procedure_worker_spec.rb @@ -9,7 +9,6 @@ RSpec.describe AutoArchiveProcedureWorker, type: :worker do subject { AutoArchiveProcedureWorker.new.perform } context "when procedures have no auto_archive_on" do - before do subject procedure.reload