Permalink
Browse files

Fix attached file name hidden on edit page

  • Loading branch information...
kyungbae committed Aug 20, 2013
1 parent 30bfd26 commit 1e94fe18f3ffe4c9aabb4ddafc65ec99ef9c11dd
Showing with 2 additions and 2 deletions.
  1. +1 −1 app/views/partials/_upload_fields.html.haml
  2. +1 −1 spec/features/edit_contribution_spec.rb
@@ -3,7 +3,7 @@
= f.input :content_cache, as: :hidden
.dummyfile
%a.fileselectbutton.btn Choose...
- %input.filename{type: 'text', name: 'filename'}
+ %input.filename{type: 'text', name: 'filename', value: f.object["content"]}
.links-remove
= link_to_remove_association '', f, :class => 'icon-minus-circle'
#alert-message
@@ -51,7 +51,7 @@
expect(page).to have_content('Can\'t be blank')
end
- it 'allsows a user add a file' do
+ it 'allows a user add a file' do
click_on 'Add Upload'
page.execute_script("$('.file.optional.upload').toggle();")
find(".input.file.optional.transcription_uploads_content").find('input').set("#{Rails.root}/spec/support/Montmarte.jpg")

0 comments on commit 1e94fe1

Please sign in to comment.