mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Fix spec
This commit is contained in:
committed by
Rob Harrington
parent
3b8cab9392
commit
bc62ad5797
@@ -1,15 +1,15 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe Spree::BaseHelper, type: :helper do
|
||||
describe "#link_to_remove_fields_without_url" do
|
||||
describe "#link_to_remove_fields" do
|
||||
let(:name) { 'Hola' }
|
||||
let(:form) { double('form_for', hidden_field: '<input type="hidden" name="_method" value="destroy">') }
|
||||
let(:options) { {} }
|
||||
|
||||
subject { helper.link_to_remove_fields_without_url(name, form, options) }
|
||||
subject { helper.link_to_remove_fields(name, form, options) }
|
||||
|
||||
it 'returns an `a` tag followed by a hidden `input` tag' do
|
||||
expect(subject).to eq("<a class=\"remove_fields icon_link with-tip icon-trash\" data-action=\"remove\" title=\"Remove\"><span class='text'>Hola</span></a><input type=\"hidden\" name=\"_method\" value=\"destroy\">")
|
||||
expect(subject).to eq("<a href=\"#\" class=\"remove_fields icon_link with-tip icon-trash\" data-action=\"remove\" title=\"Remove\"><span class='text'>Hola</span></a><input type="hidden" name="_method" value="destroy">")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user