2019-04-15 06:17:05 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-07-25 05:09:21 -04:00
|
|
|
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))
|
|
|
|
|
2017-08-02 15:55:11 -04:00
|
|
|
project = create(:project)
|
|
|
|
pending_delete_project = create(:project, pending_delete: true)
|
2017-07-25 05:09:21 -04:00
|
|
|
|
|
|
|
get :index
|
|
|
|
|
|
|
|
expect(response.body).to match(project.name)
|
|
|
|
expect(response.body).not_to match(pending_delete_project.name)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|