Created
September 6, 2017 16:43
-
-
Save jamesvanmil/7e830c82e2d5da51453ed0f5fcde38e8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require "rails_helper" | |
describe CollectionLoader do | |
let(:user) { create(:user) } | |
let(:collection_pid) { nil } | |
let(:attributes) do | |
{ | |
pid: collection_pid, | |
submitter_email: user.email, | |
title: ["A Large Collection"], | |
description: "My description", | |
creator: ["Ono, Santa"], | |
rights: "http://creativecommons.org/licenses/by-nc/4.0/", | |
visibility: "open" | |
} | |
end | |
subject { described_class.new(attributes) } | |
it "instantiates the class" do | |
expect(subject).to be_an_instance_of(described_class) | |
end | |
it "instantiates a new collection" do | |
expect(subject.collection).to be_an_instance_of(Collection) | |
end | |
describe "#create" do | |
before { subject.create } | |
it "saves the collection" do | |
pending | |
end | |
context "when an id is specified" do | |
let(:collection_id) { } | |
it "saves the collection with that id" do | |
pending | |
end | |
end | |
context "when an avatar is specified" do | |
it "associates the avatar with the collection" do | |
pending | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment