Sha256: d4f117f3210c07afc2120a14e0bbff5a3f599da5dfd7898390e340d9be6fb70f

Contents?: true

Size: 542 Bytes

Versions: 8

Compression:

Stored size: 542 Bytes

Contents

require 'spec_helper'

describe ActiveFedora::Attributes::Serializers do
  subject { ActiveFedora::Base }
  describe "deserialize_dates_from_form" do
    before do
      class Foo < ActiveFedora::Base
        attr_accessor :birthday
      end
    end
    after do
      Object.send(:remove_const, :Foo)
    end
    subject { Foo.new }
    it "should deserialize dates" do
      subject.attributes = {'birthday(1i)' =>'2012', 'birthday(2i)' =>'10', 'birthday(3i)' => '31'}
      expect(subject.birthday).to eq('2012-10-31')
    end
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
active-fedora-8.7.0 spec/unit/serializers_spec.rb
active-fedora-8.6.0 spec/unit/serializers_spec.rb
active-fedora-8.5.0 spec/unit/serializers_spec.rb
active-fedora-8.4.2 spec/unit/serializers_spec.rb
active-fedora-8.4.1 spec/unit/serializers_spec.rb
active-fedora-8.4.0 spec/unit/serializers_spec.rb
active-fedora-8.3.0 spec/unit/serializers_spec.rb
active-fedora-8.2.2 spec/unit/serializers_spec.rb