Sha256: 6b88634ae823b7aa921b3416b0abf392e1265066013070b4f81f2a6ebfff0b20
Contents?: true
Size: 592 Bytes
Versions: 5
Compression:
Stored size: 592 Bytes
Contents
# frozen_string_literal: true require "test_helper" class AdminDashboardControllerTest < ActionController::TestCase tests Admin::DashboardController setup do @routes = Rails.application.routes @controller.reset_session end test "authorizes logged admin" do get :log_in_as_admin get :index assert_response :success end test "authorizes logged user with admin flag" do get :log_in_as_admin get :index assert_response :success end test "denies user" do get :log_in_as_user get :index assert_redirected_to login_path end end
Version data entries
5 entries across 5 versions & 1 rubygems