Sha256: b424238746f7ec9fa7091f32b14b2208656b4f30cc144aa79e2bce2b674369ce

Contents?: true

Size: 1.13 KB

Versions: 6

Compression:

Stored size: 1.13 KB

Contents

require 'spec_helper'

RSpec.feature 'RasterWorkController', type: :feature do
  let(:user) { FactoryGirl.create(:admin) }

  before do
    allow(GeoblacklightJob).to receive(:perform_later)
  end

  context "an authorized user" do
    before do
      allow(CharacterizeJob).to receive(:perform_later)
      sign_in user
    end

    scenario "creating a raster work and attaching a vector work" do
      visit new_hyrax_raster_work_path
      expect(page).not_to have_selector(:css, 'a[href="#files"]')
      expect(page).to have_text 'Add Location'
      fill_in 'raster_work_title', with: 'Raster Title'
      fill_in 'raster_work_creator', with: 'User'
      fill_in 'raster_work_keyword', with: 'Raster'
      fill_in 'raster_work_spatial', with: 'France'
      fill_in 'raster_work_temporal', with: '1998-2006'
      fill_in 'raster_work_issued', with: '2001-01-01T00:00:00Z'
      choose 'raster_work_visibility_open'
      select 'Attribution 3.0 United States', from: 'raster_work[rights][]'
      choose 'raster_work_visibility_open'
      check 'agreement'
      click_button 'Save'

      expect(page).to have_text 'Raster Title'
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
geo_works-0.2.0 spec/features/create_raster_work_spec.rb
geo_works-0.1.4 spec/features/create_raster_work_spec.rb
geo_works-0.1.3 spec/features/create_raster_work_spec.rb
geo_works-0.1.2 spec/features/create_raster_work_spec.rb
geo_works-0.1.1 spec/features/create_raster_work_spec.rb
geo_works-0.1.0 spec/features/create_raster_work_spec.rb