Skip to content

Commit

Permalink
Use the file_set partial from curation_concerns
Browse files Browse the repository at this point in the history
This matches the html that wraps the files on the work show page.

Fixes #1444
  • Loading branch information
jcoyne committed Dec 10, 2015
1 parent 9983bbc commit 96b2f67
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
15 changes: 0 additions & 15 deletions app/views/curation_concerns/file_sets/_file_set.html.erb

This file was deleted.

2 changes: 1 addition & 1 deletion spec/factories/generic_works.rb
Expand Up @@ -21,7 +21,7 @@

factory :work_with_one_file do
before(:create) do |work, evaluator|
work.ordered_members << FactoryGirl.create(:file_set, user: evaluator.user, title: ['A Contained Generic File'], filename: 'filename.pdf')
work.ordered_members << FactoryGirl.create(:file_set, user: evaluator.user, title: ['A Contained Generic File'], label: 'filename.pdf')
end
end
end
Expand Down
7 changes: 6 additions & 1 deletion spec/features/work_show_spec.rb
@@ -1,7 +1,7 @@
require 'spec_helper'

describe "display a work as its owner" do
let(:work) { create(:generic_work, title: ["Magnificent splendor"], user: user) }
let(:work) { create(:work_with_one_file, title: ["Magnificent splendor"], user: user) }
let(:user) { create(:user) }
let(:work_path) { "/concern/generic_works/#{work.id}" }
before do
Expand All @@ -17,5 +17,10 @@

# and the form redirects back to this page after uploading
expect(page).to have_selector '#redirect-loc', text: work_path

# Displays FileSets already attached to this work
within '.related_files' do
expect(page).to have_selector '.filename', text: 'filename.pdf'
end
end
end

0 comments on commit 96b2f67

Please sign in to comment.