Sha256: bbe0f886f2063bcebf6f2db4b6d77fc163f82c9418c36b00c50e016364df0f16

Contents?: true

Size: 778 Bytes

Versions: 3

Compression:

Stored size: 778 Bytes

Contents

require 'spec_helper'

describe Qa::Authorities::Getty do

  describe "#new" do
    it "should raise an exception" do
      expect { described_class.new }.to raise_error
    end
  end

  describe "#subauthority_for" do
    context "without a sub-authority" do
      it "should raise an exception" do
        expect { described_class.subauthority_for }.to raise_error
      end
    end

    context "with an invalid sub-authority" do
      it "should raise an exception" do
        expect { described_class.subauthority_for("foo") }.to raise_error
      end
    end

    context "with a valid sub-authority" do
      it "should create the authority" do
        expect(described_class.subauthority_for("aat")).to be_kind_of Qa::Authorities::Getty::AAT
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qa-0.7.0 spec/lib/authorities/getty_spec.rb
qa-0.6.0 spec/lib/authorities/getty_spec.rb
qa-0.5.0 spec/lib/authorities/getty_spec.rb