Sha256: 27f84bd7e268fe2b1e296e4330062022721a18d536c6ba3153bada11ed8cea63

Contents?: true

Size: 685 Bytes

Versions: 5

Compression:

Stored size: 685 Bytes

Contents

require "spec_helper"

describe "Editing an attached file" do
  let(:user) { FactoryGirl.create(:user) }
  let(:work) { FactoryGirl.create(:generic_work_with_files, file_count: 1, user: user) }

  after do
    work.destroy
  end

  it 'should allow me to edit the file' do
    login_as(user)
    visit curation_concern_generic_work_path(work)
    within '.generic_file.attributes' do
      click_link 'Edit'
    end
    fill_in "Title", with: 'Test title'
    click_button "Update Attached File"

    expect(page).to have_selector('table.attributes tbody tr:first td', text: 'Test title')
    click_link "Edit this File"

    find_field('Title').value.should eq 'Test title'
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
curate-0.5.4 spec/features/edit_file_spec.rb
curate-0.5.2 spec/features/edit_file_spec.rb
curate-0.5.1 spec/features/edit_file_spec.rb
curate-0.5.0 spec/features/edit_file_spec.rb
curate-0.4.2 spec/features/edit_file_spec.rb