Skip to content

Commit

Permalink
Merge pull request #6474 from samvera/updates_collection_types_contro…
Browse files Browse the repository at this point in the history
…ller_spec

Utilizes Valkyrie patterns for collection_types_controller_spec.
  • Loading branch information
dlpierce authored Nov 27, 2023
2 parents 00f02db + ce098b5 commit 0583697
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docker-compose-koppie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ services:
- /dev/shm:/dev/shm
shm_size: 2G
ports:
- "4445:4444"
- "5960:5900"
- "4446:4444"
- "5961:5900"
networks:
- koppie

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,15 +307,15 @@
end

context "when collections exist of this type" do
let!(:collection) { FactoryBot.create(:collection_lw, collection_type: collection_type_to_destroy) }
let!(:collection) { valkyrie_create(:pcdm_collection, collection_type_gid: collection_type_to_destroy.to_global_id.to_s) }

it "doesn't delete the collection type or collection" do
delete :destroy, params: { id: collection_type_to_destroy }
expect(response).to have_http_status(:found)
expect(response).to redirect_to(admin_collection_types_path)
expect(flash[:alert]).to eq "Collection type cannot be altered as it has collections"
expect(Hyrax::CollectionType.exists?(collection_type_to_destroy.id)).to be true
expect(Collection.exists?(collection.id)).to be true
expect(Hyrax.query_service.find_by(id: collection.id)).to be_present
end
end
end
Expand Down

0 comments on commit 0583697

Please sign in to comment.