Sha256: 87ff82abe54d324be09c13d518bd0206af773030e3a1ef297cf1ddd9ea61b972

Contents?: true

Size: 1.11 KB

Versions: 1

Compression:

Stored size: 1.11 KB

Contents

require 'spec_helper'

describe OData4::Property do
  let(:subject) { OData4::Property.new('PropertyName', '1') }
  let(:good_comparison) { OData4::Property.new('GoodComparison', '1') }
  let(:bad_comparison) { OData4::Property.new('BadComparison', '2') }

  it { expect(subject).to respond_to(:name) }
  it { expect(subject.name).to eq('PropertyName') }

  it { expect(subject).to respond_to(:value) }
  it { expect(subject.value).to eq('1') }

  it { expect(subject).to respond_to(:xml_value) }
  it { expect(subject.xml_value).to eq('1') }

  it { expect(subject).to respond_to(:url_value) }
  it { expect(subject.url_value).to eq('1') }

  it { expect(subject).to respond_to(:type) }
  it { expect(lambda {subject.type}).to raise_error(NotImplementedError) }

  it { expect(subject).to respond_to(:allows_nil?) }
  it { expect(subject.allows_nil?).to eq(true) }

  it { expect(subject).to respond_to(:concurrency_mode) }
  it { expect(subject.concurrency_mode).to eq(:none) }

  it { expect(subject).to respond_to(:==) }
  it { expect(subject == good_comparison).to eq(true) }
  it { expect(subject == bad_comparison).to eq(false) }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
odata4-0.7.0 spec/odata4/property_spec.rb