From 6dccafcabfa3f40c10ce3d7199648e379fddbca5 Mon Sep 17 00:00:00 2001 From: KOSASIH Date: Fri, 20 Sep 2024 17:28:12 +0700 Subject: [PATCH] Create access_controller_spec.rb --- .../business/spec/lib/access_controller_spec.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 global_business/business/spec/lib/access_controller_spec.rb diff --git a/global_business/business/spec/lib/access_controller_spec.rb b/global_business/business/spec/lib/access_controller_spec.rb new file mode 100644 index 000000000..8ad729b2e --- /dev/null +++ b/global_business/business/spec/lib/access_controller_spec.rb @@ -0,0 +1,11 @@ +require 'rails_helper' + +RSpec.describe AccessController do + describe '#authorize' do + it 'authorizes the given user to perform the given action' do + user = FactoryBot.create(:user) + action = 'read' + expect(AccessController.authorize(user, action)).to be_truthy + end + end +end