Sha256: cf3851c1a2e778a43c6c8bec2103d8c577ee3d74525f8fd8d31689423ce6f44d
Contents?: true
Size: 741 Bytes
Versions: 6
Compression:
Stored size: 741 Bytes
Contents
require 'spec_helper' describe 'generic_files/edit.html.erb' do describe 'when the file has two or more resource types' do let(:generic_file) { content = double('content', versions: [], mimeType: 'application/pdf') stub_model(GenericFile, noid: '123', depositor: 'bob', resource_type: ['Book', 'Dataset'], content: content) } before do allow(controller).to receive(:current_user).and_return(stub_model(User)) assign(:generic_file, generic_file) end it "should only draw one resource_type multiselect" do render page = Capybara::Node::Simple.new(rendered) expect(page).to have_selector("select#generic_file_resource_type", count: 1) end end end
Version data entries
6 entries across 6 versions & 1 rubygems