Commit e62256ab authored by Patrick Bajao's avatar Patrick Bajao

Merge branch 'issue_342492__key_details' into 'master'

Pass formats explicitly when rendering .html format

See merge request gitlab-org/gitlab!75785
parents c2c989d9 f04e197f
...@@ -4,7 +4,7 @@ require 'spec_helper' ...@@ -4,7 +4,7 @@ require 'spec_helper'
RSpec.describe 'shared/ssh_keys/_key_delete.html.haml' do RSpec.describe 'shared/ssh_keys/_key_delete.html.haml' do
context 'when the text parameter is used' do context 'when the text parameter is used' do
it 'has text' do it 'has text' do
render 'shared/ssh_keys/key_delete.html.haml', text: 'Button', html_class: '', button_data: '' render partial: 'shared/ssh_keys/key_delete', formats: :html, locals: { text: 'Button', html_class: '', button_data: '' }
expect(rendered).to have_button('Button') expect(rendered).to have_button('Button')
end end
...@@ -12,7 +12,7 @@ RSpec.describe 'shared/ssh_keys/_key_delete.html.haml' do ...@@ -12,7 +12,7 @@ RSpec.describe 'shared/ssh_keys/_key_delete.html.haml' do
context 'when the text parameter is not used' do context 'when the text parameter is not used' do
it 'does not have text' do it 'does not have text' do
render 'shared/ssh_keys/key_delete.html.haml', html_class: '', button_data: '' render partial: 'shared/ssh_keys/key_delete', formats: :html, locals: { html_class: '', button_data: '' }
expect(rendered).to have_button('Delete') expect(rendered).to have_button('Delete')
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment