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'
RSpec.describe 'shared/ssh_keys/_key_delete.html.haml' do
context 'when the text parameter is used' 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')
end
......@@ -12,7 +12,7 @@ RSpec.describe 'shared/ssh_keys/_key_delete.html.haml' do
context 'when the text parameter is not used' 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')
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