From 6f5cafc4a9a2ab0e06fe3ec3257311bca6dcc881 Mon Sep 17 00:00:00 2001 From: Tricia Jenkins Date: Fri, 16 Oct 2015 12:30:41 -0600 Subject: [PATCH] fix setup for spec which tests the selection menu for files in a collection --- spec/features/collection/collection_spec.rb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/spec/features/collection/collection_spec.rb b/spec/features/collection/collection_spec.rb index ab8a0319..3337d8cc 100755 --- a/spec/features/collection/collection_spec.rb +++ b/spec/features/collection/collection_spec.rb @@ -188,14 +188,15 @@ end describe 'check collection for drop down menu options' do + let!(:collection_modify) do + Collection.create( title: 'Test Collection') do |c| + c.apply_depositor_metadata(admin.user_key) + end + end let!(:generic_file) do GenericFile.create( title: ['Test Item'], read_groups: ['public'] ) do |g| g.apply_depositor_metadata(admin.user_key) - end - end - let!(:collection_modify) do - Collection.create( title: 'Test Collection', members: [generic_file] ) do |c| - c.apply_depositor_metadata(admin.user_key) + g.hasCollectionId = [collection_modify.id] end end @@ -204,6 +205,7 @@ end it "should not see edit and delete options" do + expect(page).to have_content(generic_file.title.first) click_button("Select an action") expect(page).to have_content("Test Item")