Sha256: b7848dce19d5035e280f6ec0aa9884840056616402526b98d0eef270e5887e85

Contents?: true

Size: 603 Bytes

Versions: 13

Compression:

Stored size: 603 Bytes

Contents

require 'spec_helper'

describe Legato::Management::Segment do
  context "The Segment class" do
    def self.subject_class_name
      "segments"
    end

    it_behaves_like "a management finder"

    it 'creates a new segment instance from a hash of attributes' do
      user = stub(:api_key => nil)
      segment = Legato::Management::Segment.new({"id" => 12345, "name" => "Segment 1", "definition" => "Some Segment"}, user)
      segment.user.should == user
      segment.id.should == 12345
      segment.name.should == "Segment 1"
      segment.definition.should == "Some Segment"
    end
  end
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/legato-0.7.0/spec/lib/legato/management/segment_spec.rb
legato-0.7.0 spec/lib/legato/management/segment_spec.rb
legato-0.6.2 spec/lib/legato/management/segment_spec.rb
legato-0.6.1 spec/lib/legato/management/segment_spec.rb
legato-0.6.0 spec/lib/legato/management/segment_spec.rb
legato-0.5.2 spec/lib/legato/management/segment_spec.rb
legato-0.5.1 spec/lib/legato/management/segment_spec.rb
legato-0.5.0 spec/lib/legato/management/segment_spec.rb
legato-0.4.0 spec/lib/legato/management/segment_spec.rb
legato-0.3.3 spec/lib/legato/management/segment_spec.rb
legato-0.3.2 spec/lib/legato/management/segment_spec.rb
legato-0.3.1 spec/lib/legato/management/segment_spec.rb
legato-0.3.0 spec/lib/legato/management/segment_spec.rb