convert simple quote to double quote
This commit is contained in:
parent
1d53214870
commit
05f83fb3d3
1 changed files with 7 additions and 7 deletions
|
@ -1,8 +1,8 @@
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe NewGestionnaire::ProceduresController, type: :controller do
|
describe NewGestionnaire::ProceduresController, type: :controller do
|
||||||
describe 'before_action: ensure_ownership!' do
|
describe "before_action: ensure_ownership!" do
|
||||||
it 'is present' do
|
it "is present" do
|
||||||
before_actions = NewGestionnaire::ProceduresController
|
before_actions = NewGestionnaire::ProceduresController
|
||||||
._process_action_callbacks
|
._process_action_callbacks
|
||||||
.find_all{|process_action_callbacks| process_action_callbacks.kind == :before}
|
.find_all{|process_action_callbacks| process_action_callbacks.kind == :before}
|
||||||
|
@ -12,7 +12,7 @@ describe NewGestionnaire::ProceduresController, type: :controller do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'ensure_ownership!' do
|
describe "ensure_ownership!" do
|
||||||
let(:gestionnaire) { create(:gestionnaire) }
|
let(:gestionnaire) { create(:gestionnaire) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
|
@ -23,19 +23,19 @@ describe NewGestionnaire::ProceduresController, type: :controller do
|
||||||
@controller.send(:ensure_ownership!)
|
@controller.send(:ensure_ownership!)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when a gestionnaire asks for its procedure' do
|
context "when a gestionnaire asks for its procedure" do
|
||||||
let(:asked_procedure) { create(:procedure, gestionnaires: [gestionnaire]) }
|
let(:asked_procedure) { create(:procedure, gestionnaires: [gestionnaire]) }
|
||||||
|
|
||||||
it 'does not redirects nor flash' do
|
it "does not redirects nor flash" do
|
||||||
expect(@controller).not_to have_received(:redirect_to)
|
expect(@controller).not_to have_received(:redirect_to)
|
||||||
expect(flash.alert).to eq(nil)
|
expect(flash.alert).to eq(nil)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'when a gestionnaire asks for another procedure' do
|
context "when a gestionnaire asks for another procedure" do
|
||||||
let(:asked_procedure) { create(:procedure) }
|
let(:asked_procedure) { create(:procedure) }
|
||||||
|
|
||||||
it 'redirects and flash' do
|
it "redirects and flash" do
|
||||||
expect(@controller).to have_received(:redirect_to).with(root_path)
|
expect(@controller).to have_received(:redirect_to).with(root_path)
|
||||||
expect(flash.alert).to eq("Vous n'avez pas accès à cette procédure")
|
expect(flash.alert).to eq("Vous n'avez pas accès à cette procédure")
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue