[Fix #503] Dossier: remove replied
This commit is contained in:
parent
030a11d98c
commit
633b55aca0
32 changed files with 37 additions and 169 deletions
|
@ -1,7 +1,7 @@
|
|||
require 'spec_helper'
|
||||
|
||||
describe Backoffice::CommentairesController, type: :controller do
|
||||
let(:dossier) { create(:dossier, :replied) }
|
||||
let(:dossier) { create(:dossier, :initiated) }
|
||||
let(:dossier_id) { dossier.id }
|
||||
let(:email_commentaire) { 'test@test.com' }
|
||||
let(:texte_commentaire) { 'Commentaire de test' }
|
||||
|
@ -124,7 +124,7 @@ describe Backoffice::CommentairesController, type: :controller do
|
|||
|
||||
subject { dossier.state }
|
||||
|
||||
it { is_expected.to eq('replied') }
|
||||
it { is_expected.to eq('initiated') }
|
||||
|
||||
it 'Notification email is send' do
|
||||
expect(NotificationMailer).to receive(:new_answer).and_return(NotificationMailer)
|
||||
|
|
|
@ -360,11 +360,11 @@ describe Backoffice::DossiersController, type: :controller do
|
|||
|
||||
subject { post :reopen, params: {dossier_id: dossier_id} }
|
||||
|
||||
it 'change state to replied' do
|
||||
it 'change state to initiated' do
|
||||
subject
|
||||
|
||||
dossier.reload
|
||||
expect(dossier.state).to eq('replied')
|
||||
expect(dossier.state).to eq('initiated')
|
||||
end
|
||||
|
||||
it { is_expected.to redirect_to backoffice_dossier_path(id: dossier_id) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue