Sha256: ffe324627ab6c826e98d8c17e0b551e59bddd4f485d58586c2710d52b468c3f7
Contents?: true
Size: 1.15 KB
Versions: 16
Compression:
Stored size: 1.15 KB
Contents
require 'spec_helper' describe 'curation_concerns/file_sets/_show_characterization_details.html.erb', type: :view do let(:file) { build(:file_set).tap { |f| f.apply_depositor_metadata("user") } } let(:solr_document) { SolrDocument.new(file.to_solr) } let(:ability) { double "Ability" } let(:presenter) { Sufia::FileSetPresenter.new(solr_document, ability) } let(:mock_metadata) do { format: ["Tape"], long_term: ["x" * 255], multi_term: ["1", "2", "3", "4", "5", "6", "7", "8"], string_term: 'oops, I used a string instead of an array' } end before do allow(presenter).to receive(:characterization_metadata).and_return(mock_metadata) assign(:presenter, presenter) render end let(:page) { Capybara::Node::Simple.new(rendered) } it 'displays characterization terms' do expect(page).to have_content("oops, I used a string instead of an array") expect(page).to have_content("xxxxxxx...") expect(page).to have_content("Format: Tape") expect(page).to have_css("div.modal") expect(page).to have_css("div.modal-body") expect(page).to have_css("h2#extraFieldsModal_multi_term_Label") end end
Version data entries
16 entries across 16 versions & 1 rubygems