summaryrefslogtreecommitdiff
path: root/spec/controllers/admin/dashboard_controller_spec.rb
blob: 4de69a9aea1ef0d9999a4e442e178da003a05c96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'spec_helper'

describe Admin::DashboardController do
  describe '#index' do
    context 'with pending_delete projects' do
      render_views

      it 'does not retrieve projects that are pending deletion' do
        sign_in(create(:admin))

        project = create(:project)
        pending_delete_project = create(:project, pending_delete: true)

        get :index

        expect(response.body).to match(project.name)
        expect(response.body).not_to match(pending_delete_project.name)
      end
    end
  end
end