Sha256: 2b9c927476edc9e4efb48850760412b9c0f111bdb280d79c3e461fe04ef76ca8
Contents?: true
Size: 721 Bytes
Versions: 11
Compression:
Stored size: 721 Bytes
Contents
module Ddr::Models RSpec.describe License do describe ".call" do subject { described_class.call(obj) } describe "when the object has a license URL" do let(:url) { "http://example.com" } let(:obj) { double(pid: "test:1", license: url) } before do allow(described_class).to receive(:find).with(url: url) { described_class.new(url: url, title: "A License") } end its(:pid) { is_expected.to eq("test:1") } its(:to_s) { is_expected.to eq("A License") } end describe "when the object does not have a license" do let(:obj) { double(pid: "test:1", license: nil) } it { is_expected.to be_nil } end end end end
Version data entries
11 entries across 11 versions & 1 rubygems