feat(profile): keep procedure id context between admin & instructeur profile
This commit is contained in:
parent
e459f68ddb
commit
c541ed7c93
3 changed files with 38 additions and 2 deletions
|
@ -55,4 +55,22 @@ describe AccountDropdownComponent, type: :component do
|
|||
end
|
||||
end
|
||||
end
|
||||
|
||||
context 'when in procedures controller' do
|
||||
before do
|
||||
allow_any_instance_of(ApplicationController).to receive(:instructeur_signed_in?).and_return(true)
|
||||
allow_any_instance_of(ApplicationController).to receive(:controller_name).and_return('procedures')
|
||||
end
|
||||
|
||||
context 'with procedure id' do
|
||||
before do
|
||||
allow_any_instance_of(ApplicationController).to receive(:params)
|
||||
.and_return({ id: '123' })
|
||||
end
|
||||
|
||||
it 'links to specific procedure for instructor' do
|
||||
expect(subject.to_html).to include('/procedures/123')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue