Sha256: 3eb0fc783800e943cd8c2fdcd4cef55f55385e5e02ac034106b3d3917ecebb9d

Contents?: true

Size: 672 Bytes

Versions: 2

Compression:

Stored size: 672 Bytes

Contents

# encoding: UTF-8
require 'gooddata'

describe GoodData::Model::AttributeBlueprintField do

  before(:each) do
    @model_view = MultiJson.load(File.read('./spec/data/wire_models/model_view.json'))
    @blueprint = GoodData::Model::FromWire.from_wire(@model_view)
    @dataset = @blueprint.datasets('dataset.account')
    @attribute = @dataset.attributes('attr.account.region')
  end

  describe '#labels' do
    it 'should return labels on dataset' do
      expect(@attribute.labels.count).to eq 1
    end
  end

  describe '#dataset' do
    it 'should return dataset of the attribtue field' do
      expect(@attribute.dataset_blueprint).to eq @dataset
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gooddata-0.6.20 spec/unit/models/blueprint/attributes_spec.rb
gooddata-0.6.19 spec/unit/models/blueprint/attributes_spec.rb