require'spec_helper'describeAdmin::ImpersonationControllerdolet(:admin){create(:admin)}beforedosign_in(admin)enddescribe'CREATE #impersonation when blocked'dolet(:blocked_user){create(:user,state: :blocked)}it'does not allow impersonation'dopost:create,id: blocked_user.usernameexpect(flash[:alert]).toeq'You cannot impersonate a blocked user'endendend