Sha256: 1e9030ba4fe36f0543b10deb63bec7cab65a0d88297277b2ab86eb507990dac3

Contents?: true

Size: 538 Bytes

Versions: 34

Compression:

Stored size: 538 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 "deserializes 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

34 entries across 34 versions & 1 rubygems

Version Path
active-fedora-10.3.0 spec/unit/serializers_spec.rb
active-fedora-9.7.3 spec/unit/serializers_spec.rb
active-fedora-10.3.0.rc2 spec/unit/serializers_spec.rb
active-fedora-10.3.0.rc1 spec/unit/serializers_spec.rb
active-fedora-10.2.1 spec/unit/serializers_spec.rb
active-fedora-10.2.0 spec/unit/serializers_spec.rb
active-fedora-11.0.0.rc1 spec/unit/serializers_spec.rb
active-fedora-10.1.0 spec/unit/serializers_spec.rb
active-fedora-10.1.0.rc1 spec/unit/serializers_spec.rb
active-fedora-9.7.2 spec/unit/serializers_spec.rb
active-fedora-10.0.0 spec/unit/serializers_spec.rb
active-fedora-10.0.0.beta4 spec/unit/serializers_spec.rb
active-fedora-10.0.0.beta3 spec/unit/serializers_spec.rb
active-fedora-10.0.0.beta2 spec/unit/serializers_spec.rb
active-fedora-10.0.0.beta1 spec/unit/serializers_spec.rb
active-fedora-9.13.0 spec/unit/serializers_spec.rb
active-fedora-9.12.0 spec/unit/serializers_spec.rb
active-fedora-9.11.0 spec/unit/serializers_spec.rb
active-fedora-9.10.4 spec/unit/serializers_spec.rb
active-fedora-9.10.3 spec/unit/serializers_spec.rb