Sha256: 028ded9328fde73dcbe9391a6e560aab73785e30249fd282e4e4b2dcf3892f7e

Contents?: true

Size: 885 Bytes

Versions: 39

Compression:

Stored size: 885 Bytes

Contents

require 'spec_helper'

describe CurationConcerns::PermissionsController do
  let(:user) { create(:user) }
  before { sign_in user }

  describe '#confirm' do
    let(:generic_work) { create(:generic_work, user: user) }

    it 'draws the page' do
      get :confirm, id: generic_work
      expect(response).to be_success
    end
  end

  describe '#copy' do
    let(:generic_work) { create(:generic_work, user: user) }

    it 'adds a worker to the queue' do
      expect(VisibilityCopyJob).to receive(:perform_later).with(generic_work)
      post :copy, id: generic_work
      expect(response).to redirect_to main_app.curation_concerns_generic_work_path(generic_work)
      expect(flash[:notice]).to eq 'Updating file permissions. This may take a few minutes. You may want to refresh your browser or return to this record later to see the updated file permissions.'
    end
  end
end

Version data entries

39 entries across 39 versions & 1 rubygems

Version Path
curation_concerns-1.4.0 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.3.3 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.3.2 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.3.1 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.3.0 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.2.0 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.1.2 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.1.1 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.1.0 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta10 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta9 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta8 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta7 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta6 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta5 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta4 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta3 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta2 spec/controllers/curation_concerns/permissions_controller_spec.rb
curation_concerns-1.0.0.beta1 spec/controllers/curation_concerns/permissions_controller_spec.rb