Commit f04e197f authored by Siddharth Asthana's avatar Siddharth Asthana

Pass formats explicitly when rendering .html format

Changelog: other
parent c9202be3
...@@ -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