Task me sync
This commit is contained in:
@@ -6,7 +6,6 @@ describe HeadshotCollection do
|
||||
project = create(:project,
|
||||
appearance_releases: create_list(:appearance_release, 1),
|
||||
talent_releases: create_list(:talent_release, 1),
|
||||
headshot_collection_uid: "123abc"
|
||||
)
|
||||
|
||||
collection = HeadshotCollection.for_project(project)
|
||||
@@ -15,7 +14,7 @@ describe HeadshotCollection do
|
||||
expect(collection).to be_a(HeadshotCollection)
|
||||
expect(collection.releasables).to include(project.appearance_releases.first)
|
||||
expect(collection.releasables).to include(project.talent_releases.first)
|
||||
expect(collection.collection_uid).to eq(project.headshot_collection_uid)
|
||||
expect(collection.collection_uid).to eq(project.id)
|
||||
end
|
||||
|
||||
context "when a release has no headshot photo attachment" do
|
||||
@@ -86,17 +85,6 @@ describe HeadshotCollection do
|
||||
expect(mapping["appearance_release_#{releases.first.id}"]).to include("123")
|
||||
expect(mapping["talent_release_#{releases.last.id}"]).to include("456")
|
||||
end
|
||||
|
||||
context "when collection uid is blank" do
|
||||
it "is not included in the hash" do
|
||||
releases = []
|
||||
collection = HeadshotCollection.new(nil, releases)
|
||||
|
||||
hash = collection.to_hash
|
||||
|
||||
expect(hash.keys).not_to include(:collection_uid)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
Reference in New Issue
Block a user