Sha256: f588e0218bac085473d1312d7693b16dc095d7a712059f3b85f31798a513b2b9

Contents?: true

Size: 729 Bytes

Versions: 1

Compression:

Stored size: 729 Bytes

Contents

module Ddr::Auth
  RSpec.describe Group, agents: true do

    subject { FactoryGirl.build(:group) }

    it_behaves_like "an agent" do
      let(:type) { RDF::FOAF.Group }
      let(:agent_type) { :group }
    end

    describe "validation" do
      describe "when built with a name is in the format of an email address" do
        it "should raise an exception" do
          expect { described_class.build("bob@example.com") }.to raise_error
        end
      end
    end

    describe "backward-compatible behavior" do
      it "should delegate missing methods to the group name string" do
        name = subject.to_s
        expect(subject.sub("Group", "Apple")).to eq(name.sub("Group", "Apple"))
      end
    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ddr-models-1.13.1 spec/auth/group_spec.rb