Sha256: 138c67fb1d0244165ed6284d0413ca3783771984c5a679dfe7792a5f341ec7a2
Contents?: true
Size: 1008 Bytes
Versions: 5
Compression:
Stored size: 1008 Bytes
Contents
require 'spec_helper' describe 'hyrax/batch_uploads/_form.html.erb', type: :view do let(:work) { GenericWork.new } let(:ability) { double('ability', current_user: user) } let(:form) { Hyrax::Forms::BatchUploadForm.new(work, ability, controller) } let(:user) { stub_model(User) } before do stub_template "hyrax/base/_guts4form.html.erb" => "Form guts" assign(:form, form) end let(:page) do render Capybara::Node::Simple.new(rendered) end it "draws the page" do expect(page).to have_selector("form[action='/batch_uploads']") expect(page).to have_selector("form[action='/batch_uploads'][data-behavior='work-form']") expect(page).to have_selector("form[action='/batch_uploads'][data-param-key='batch_upload_item']") # No title, because it's captured per file (e.g. Display label) expect(page).not_to have_selector("input#generic_work_title") expect(view.content_for(:files_tab)).to have_link("New Work", href: "/concern/generic_works/new") end end
Version data entries
5 entries across 5 versions & 1 rubygems