Sha256: abf2019f0261815d4e105e9fe8c9d4de58f0227f10670a89299cfd6f3342bc58
Contents?: true
Size: 518 Bytes
Versions: 4
Compression:
Stored size: 518 Bytes
Contents
require 'rails_helper' RSpec.describe Admin::AdminController, type: :controller do let(:user) { create(:user) } describe 'GET to dashboard' do it 'render dashboard if sign in user' do sign_in user get :root expect(response).to have_http_status(302) expect(response).to redirect_to('/admin/dashboard') end it 'render dashboard if not sign in user' do get :root expect(response).to have_http_status(302) expect(response).to redirect_to('/') end end end
Version data entries
4 entries across 4 versions & 1 rubygems