Sha256: 3b528744c9e53a11f79620dcfe211d69b22d968afee2f7785f0a2159379b92c0

Contents?: true

Size: 714 Bytes

Versions: 30

Compression:

Stored size: 714 Bytes

Contents

require 'spec_helper'

describe 'SelectWithModalHelpInput', type: :input do
  subject { input_for file, :rights, options }
  let(:file) { FileSet.new }
  let(:base_options) { { as: :select_with_modal_help, required: true, collection: RightsService.select_options } }
  let(:options) { base_options }

  context "when a blank is requested" do
    let(:options) { base_options.merge(include_blank: true) }
    it 'renders a blank option' do
      expect(subject).to have_selector 'select option[value=""]'
    end
  end

  context "when a blank is not requested" do
    it 'has no blanks' do
      expect(subject).to have_selector 'select option:first-child', text: 'Attribution 3.0 United States'
    end
  end
end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
curation_concerns-1.0.0.beta4 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-1.0.0.beta3 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-1.0.0.beta2 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-1.0.0.beta1 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.14.0 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.14.0.pre4 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.14.0.pre3 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.14.0.pre2 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.14.0.pre1 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.13.1 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.13.0 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.12.0 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.12.0.pre9 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.12.0.pre8 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.12.0.pre7 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.12.0.pre6 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.12.0.pre5 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.12.0.pre4 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.12.0.pre3 spec/inputs/select_with_modal_help_input_spec.rb
curation_concerns-0.12.0.pre2 spec/inputs/select_with_modal_help_input_spec.rb