Skip to content

Instantly share code, notes, and snippets.

@jamesvanmil
Created September 6, 2017 16:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamesvanmil/7e830c82e2d5da51453ed0f5fcde38e8 to your computer and use it in GitHub Desktop.
Save jamesvanmil/7e830c82e2d5da51453ed0f5fcde38e8 to your computer and use it in GitHub Desktop.
# 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