Sha256: 729038d35e24c5bfb812e59770c2316c697ccd296aaa7542c85a808f141cbb2c

Contents?: true

Size: 789 Bytes

Versions: 9

Compression:

Stored size: 789 Bytes

Contents

require 'spec_helper'

RSpec.describe Hyrax::Admin::DashboardPresenter do
  let(:instance) { described_class.new }

  describe "#user_count" do
    before do
      create(:user)
      create(:user)
      create(:user, :guest)
    end

    subject { instance.user_count }

    it { is_expected.to eq 2 }
  end

  describe "#repository_objects" do
    subject { instance.repository_objects }
    it { is_expected.to be_kind_of Hyrax::Admin::RepositoryObjectPresenter }
  end

  describe "#repository_growth" do
    subject { instance.repository_growth }
    it { is_expected.to be_kind_of Hyrax::Admin::RepositoryGrowthPresenter }
  end

  describe "#user_activity" do
    subject { instance.user_activity }
    it { is_expected.to be_kind_of Hyrax::Admin::UserActivityPresenter }
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hyrax-1.1.1 spec/presenters/hyrax/admin/dashboard_presenter_spec.rb
hyrax-1.1.0 spec/presenters/hyrax/admin/dashboard_presenter_spec.rb
hyrax-1.0.5 spec/presenters/hyrax/admin/dashboard_presenter_spec.rb
hyrax-1.0.4 spec/presenters/hyrax/admin/dashboard_presenter_spec.rb
hyrax-1.0.3 spec/presenters/hyrax/admin/dashboard_presenter_spec.rb
hyrax-1.0.2 spec/presenters/hyrax/admin/dashboard_presenter_spec.rb
hyrax-1.0.1 spec/presenters/hyrax/admin/dashboard_presenter_spec.rb
hyrax-1.0.0.rc2 spec/presenters/hyrax/admin/dashboard_presenter_spec.rb
hyrax-1.0.0.rc1 spec/presenters/hyrax/admin/dashboard_presenter_spec.rb