Sha256: 0f779a832fd2f5a4ed539764ecc63c555b9cdd0a68b71333bc8e49593dfcd955

Contents?: true

Size: 650 Bytes

Versions: 8

Compression:

Stored size: 650 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) }

  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

8 entries across 8 versions & 1 rubygems

Version Path
curate-0.6.6 spec/features/edit_file_spec.rb
curate-0.6.5 spec/features/edit_file_spec.rb
curate-0.6.4 spec/features/edit_file_spec.rb
curate-0.6.3 spec/features/edit_file_spec.rb
curate-0.6.1 spec/features/edit_file_spec.rb
curate-0.6.0 spec/features/edit_file_spec.rb
curate-0.5.6 spec/features/edit_file_spec.rb
curate-0.5.5 spec/features/edit_file_spec.rb