Sha256: 24d5ad766b33f31e13cf1578e2cbc2a863bbaebe74f150b73b06f2c367e86882
Contents?: true
Size: 747 Bytes
Versions: 40
Compression:
Stored size: 747 Bytes
Contents
require "spec_helper" module ActiveFedora describe Checksum do subject { described_class.new(file) } let(:uri) { ::RDF::URI("urn:sha1:bb3200c2ddaee4bd7b9a4dc1ad3e10ed886eaef1") } describe "when initialized with a file having a digest" do let(:file) { double(digest: [uri]) } its(:uri) { is_expected.to eq(uri) } its(:value) { is_expected.to eq("bb3200c2ddaee4bd7b9a4dc1ad3e10ed886eaef1") } its(:algorithm) { is_expected.to eq("SHA1") } end describe "when initialized with a file not having a digest" do let(:file) { double(digest: []) } its(:uri) { is_expected.to be_nil } its(:value) { is_expected.to be_nil } its(:algorithm) { is_expected.to be_nil } end end end
Version data entries
40 entries across 40 versions & 1 rubygems