diff --git a/app/facades/invite_dossier_facades.rb b/app/facades/invite_dossier_facades.rb index 63e9b5a61..cda91257e 100644 --- a/app/facades/invite_dossier_facades.rb +++ b/app/facades/invite_dossier_facades.rb @@ -2,6 +2,6 @@ class InviteDossierFacades < DossierFacades #TODO rechercher en fonction de la personne/email def initialize dossier_id, email - @dossier = (Invite.where(email: email).find(dossier_id)).dossier + @dossier = Invite.where(email: email, dossier_id: dossier_id).first!.dossier end end \ No newline at end of file diff --git a/spec/controllers/users/description_controller_spec.rb b/spec/controllers/users/description_controller_spec.rb index b459d6341..ace2b9f1b 100644 --- a/spec/controllers/users/description_controller_spec.rb +++ b/spec/controllers/users/description_controller_spec.rb @@ -7,7 +7,7 @@ describe Users::DescriptionController, type: :controller, vcr: {cassette_name: ' let(:invite_by_user) { create :user, email: 'invite@plop.com' } let(:procedure) { create(:procedure, :with_two_type_de_piece_justificative, :with_type_de_champ, :with_datetime, cerfa_flag: true) } - let(:dossier) { create(:dossier, procedure: procedure, user: owner_user) } + let(:dossier) { create(:dossier, procedure: procedure, user: owner_user, state: 'initiated') } let(:dossier_id) { dossier.id } let(:bad_dossier_id) { Dossier.count + 10000 } diff --git a/spec/controllers/users/dossiers/invites_controller_spec.rb b/spec/controllers/users/dossiers/invites_controller_spec.rb index 70bfcbc70..e2d71450a 100644 --- a/spec/controllers/users/dossiers/invites_controller_spec.rb +++ b/spec/controllers/users/dossiers/invites_controller_spec.rb @@ -1,4 +1,4 @@ -RSpec.describe Users::Dossiers::InvitesController, type: :controller do +describe Users::Dossiers::InvitesController, type: :controller do describe '#authenticate_user!' do let(:user) { create :user } let(:invite) { create :invite } diff --git a/spec/models/notification_spec.rb b/spec/models/notification_spec.rb index 8adf11ab2..0a945ff9f 100644 --- a/spec/models/notification_spec.rb +++ b/spec/models/notification_spec.rb @@ -3,7 +3,6 @@ require 'spec_helper' describe Notification do it { is_expected.to have_db_column(:already_read) } it { is_expected.to have_db_column(:liste) } - it { is_expected.to have_db_column(:multiple) } it { is_expected.to have_db_column(:type_notif) } it { is_expected.to have_db_column(:created_at) } it { is_expected.to have_db_column(:updated_at) } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d999bf456..4e7319f2a 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -41,7 +41,7 @@ Capybara.register_driver :poltergeist do |app| Capybara::Poltergeist::Driver.new(app, js_errors: true, port: 44_678 + ENV['TEST_ENV_NUMBER'].to_i, phantomjs_options: ['--proxy-type=none'], timeout: 180) end -#ActiveSupport::Deprecation.silenced = true +ActiveSupport::Deprecation.silenced = true Capybara.default_max_wait_time = 1 diff --git a/spec/views/admin/gestionnaires/index.html.haml_spec.rb b/spec/views/admin/gestionnaires/index.html.haml_spec.rb index 222b43b2c..9c57ee063 100644 --- a/spec/views/admin/gestionnaires/index.html.haml_spec.rb +++ b/spec/views/admin/gestionnaires/index.html.haml_spec.rb @@ -29,6 +29,6 @@ describe 'admin/gestionnaires/index.html.haml', type: :view do array: true)) render end - it { expect(rendered).to match(/plop\d+@plop.com/) } + it { expect(rendered).to match(/gest\d+@plop.com/) } end end \ No newline at end of file