# frozen_string_literal: truerequire'spec_helper'describeEnforcesAdminAuthenticationdolet(:user){create(:user)}beforedosign_in(user)endcontroller(ApplicationController)do# `described_class` is not available in this contextincludeEnforcesAdminAuthentication# rubocop:disable RSpec/DescribedClassdefindexhead:okendenddescribe'authenticate_admin!'docontext'as an admin'dolet(:user){create(:admin)}it'renders ok'doget:indexexpect(response).tohave_gitlab_http_status(200)endendcontext'as a user'doit'renders a 404'doget:indexexpect(response).tohave_gitlab_http_status(404)endendendend