Sha256: 9058153cd7f181baa6bbea9c292ea61799b24629005868137523cfd278bfc488

Contents?: true

Size: 627 Bytes

Versions: 9

Compression:

Stored size: 627 Bytes

Contents

require 'spec_helper'

RSpec.describe 'hyrax/base/_find_work_widget.html.erb', type: :view do
  let(:work) { stub_model(GenericWork) }
  let(:form) do
    view.simple_form_for(work, url: '/update') do |work_form|
      return work_form
    end
  end
  before do
    allow(view).to receive(:current_user).and_return(stub_model(User))
    render 'hyrax/base/find_work_widget',
           f: form,
           name: 'child_work',
           user_email: 'foo@bar.com',
           id: '999'
  end
  it "has a widget" do
    expect(rendered).to have_selector('input[data-autocomplete-url="/authorities/search/find_works"]')
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hyrax-1.1.1 spec/views/hyrax/base/_find_work_widget.html.erb_spec.rb
hyrax-1.1.0 spec/views/hyrax/base/_find_work_widget.html.erb_spec.rb
hyrax-1.0.5 spec/views/hyrax/base/_find_work_widget.html.erb_spec.rb
hyrax-1.0.4 spec/views/hyrax/base/_find_work_widget.html.erb_spec.rb
hyrax-1.0.3 spec/views/hyrax/base/_find_work_widget.html.erb_spec.rb
hyrax-1.0.2 spec/views/hyrax/base/_find_work_widget.html.erb_spec.rb
hyrax-1.0.1 spec/views/hyrax/base/_find_work_widget.html.erb_spec.rb
hyrax-1.0.0.rc2 spec/views/hyrax/base/_find_work_widget.html.erb_spec.rb
hyrax-1.0.0.rc1 spec/views/hyrax/base/_find_work_widget.html.erb_spec.rb