Sha256: baf25da5da65404a17760e25792a1148d4b258f851a7886b4b422a0fc21f4f55

Contents?: true

Size: 718 Bytes

Versions: 37

Compression:

Stored size: 718 Bytes

Contents

RSpec.describe Hyrax::Admin::UsersController, type: :controller do
  before do
    expect(controller).to receive(:authorize!).with(:read, :admin_dashboard).and_return(true)
  end

  describe "#index" do
    it "is successful" do
      expect(controller).to receive(:add_breadcrumb).with(I18n.t('hyrax.controls.home'), root_path)
      expect(controller).to receive(:add_breadcrumb).with(I18n.t('hyrax.dashboard.breadcrumbs.admin'), dashboard_path)
      expect(controller).to receive(:add_breadcrumb).with(I18n.t('hyrax.admin.users.index.title'), admin_users_path)

      get :index
      expect(response).to be_successful
      expect(assigns[:presenter]).to be_kind_of Hyrax::Admin::UsersPresenter
    end
  end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
hyrax-2.6.0 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-3.0.0.pre.rc1 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-3.0.0.pre.beta3 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.5.1 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.5.0 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-3.0.0.pre.beta2 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.4.1 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-3.0.0.pre.beta1 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.4.0 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.3.3 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.3.2 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.3.1 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.3.0 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.0.3 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.2.4 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.2.3 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.2.2 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.2.1 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.2.0 spec/controllers/hyrax/admin/users_controller_spec.rb
hyrax-2.1.0 spec/controllers/hyrax/admin/users_controller_spec.rb