Sha256: 3d30b17d95fb0f8e415a4c2fefa67e001d97d163c51a03c1a9db5d00fb1bf952

Contents?: true

Size: 796 Bytes

Versions: 1

Compression:

Stored size: 796 Bytes

Contents

# encoding: utf-8

require_relative '../spec_helper'

describe "Producer" do
  subject { Riksteatern::Producer }

  let(:example_data) {
    {
      'producerId'       => 123,
      'producerName'     => 'foo',
      'mainContactId'    => 456,
      'producerHomepage' => 'http://producer.url/',
      'producerLogotype' => 'http://producer.url/logotype.png'
    }
  }

  it "has the attributes id, name, main_contact_id, homepage and logotype" do
    subject.new(example_data).tap do |p|
      p.id.must_equal example_data['producerId']
      p.name.must_equal example_data['producerName']
      p.main_contact_id.must_equal example_data['mainContactId']
      p.homepage.must_equal example_data['producerHomepage']
      p.logotype.must_equal example_data['producerLogotype']
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
riksteatern-0.0.1 spec/riksteatern/producent_spec.rb