Sha256: 5f6f7c160a92b6380f202192691a154043fefa8d973e5b1222d676dbbbf0fa81

Contents?: true

Size: 541 Bytes

Versions: 33

Compression:

Stored size: 541 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

33 entries across 33 versions & 1 rubygems

Version Path
active-fedora-9.0.8 spec/unit/serializers_spec.rb
active-fedora-9.5.0 spec/unit/serializers_spec.rb
active-fedora-9.4.3 spec/unit/serializers_spec.rb
active-fedora-9.4.2 spec/unit/serializers_spec.rb
active-fedora-9.4.1 spec/unit/serializers_spec.rb
active-fedora-9.4.0 spec/unit/serializers_spec.rb
active-fedora-9.3.0 spec/unit/serializers_spec.rb
active-fedora-9.2.1 spec/unit/serializers_spec.rb
active-fedora-9.2.0 spec/unit/serializers_spec.rb
active-fedora-9.2.0.rc2 spec/unit/serializers_spec.rb
active-fedora-9.2.0.rc1 spec/unit/serializers_spec.rb
active-fedora-9.1.2 spec/unit/serializers_spec.rb
active-fedora-9.1.1 spec/unit/serializers_spec.rb
active-fedora-9.1.0 spec/unit/serializers_spec.rb
active-fedora-9.1.0.rc1 spec/unit/serializers_spec.rb
active-fedora-9.0.6 spec/unit/serializers_spec.rb
active-fedora-9.0.5 spec/unit/serializers_spec.rb
active-fedora-9.0.4 spec/unit/serializers_spec.rb
active-fedora-9.0.3 spec/unit/serializers_spec.rb
active-fedora-9.0.2 spec/unit/serializers_spec.rb