Sha256: 2bb792ff1da4dfaab10aff7863422001e4644f44904340039b3b2321cc22ad67

Contents?: true

Size: 505 Bytes

Versions: 2

Compression:

Stored size: 505 Bytes

Contents

require 'spec_helper'
require 'druid/elements'

describe Druid::Elements::FileField do
  describe "interface" do
    let(:element) { double 'element' }
    let(:file_field) { Druid::Elements::FileField.new(element) }

    it "should set its' value" do
      expect(element).to receive(:set).with('a file')
      file_field.value = 'a file'
    end

    it "should register as type :file" do
      expect(Druid::Elements.element_class_for(:input, :file)).to be Druid::Elements::FileField
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
druid-ts-1.2.4 spec/druid/elements/file_field_spec.rb
druid-ts-1.2.3 spec/druid/elements/file_field_spec.rb