Sha256: 0d067d5dccb73d5f7b1085a22ec0fb09e24b06f614aeb6fc7a9c0b442638f1ff

Contents?: true

Size: 519 Bytes

Versions: 6

Compression:

Stored size: 519 Bytes

Contents

require 'spec_helper'

describe OData4::Properties::Time do
  let(:subject) { OData4::Properties::Time.new('Timely', '21:00:00-08:00') }

  it { expect(subject.type).to eq('Edm.Time') }
  it { expect(subject.value).to eq(Time.strptime('21:00:00-08:00', '%H:%M:%S%:z')) }

  it { expect {subject.value = 'bad'}.to raise_error(ArgumentError) }

  it { expect(lambda {
    subject.value = Time.strptime('13:22:12+04:00', '%H:%M:%S%:z')
    subject.value
  }.call).to eq(Time.strptime('13:22:12+04:00', '%H:%M:%S%:z'))}
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
odata4-0.9.1 spec/odata4/properties/time_spec.rb
odata4-0.9.0 spec/odata4/properties/time_spec.rb
odata4-0.8.2 spec/odata4/properties/time_spec.rb
odata4-0.8.1 spec/odata4/properties/time_spec.rb
odata4-0.8.0 spec/odata4/properties/time_spec.rb
odata4-0.7.0 spec/odata4/properties/time_spec.rb