diff options
Diffstat (limited to 'spec/policies/concerns/policy_actor_spec.rb')
-rw-r--r-- | spec/policies/concerns/policy_actor_spec.rb | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/spec/policies/concerns/policy_actor_spec.rb b/spec/policies/concerns/policy_actor_spec.rb index 7271cbb4a9d..7fd9db67032 100644 --- a/spec/policies/concerns/policy_actor_spec.rb +++ b/spec/policies/concerns/policy_actor_spec.rb @@ -2,7 +2,17 @@ require 'spec_helper' -RSpec.describe PolicyActor do +RSpec.describe PolicyActor, feature_category: :shared do + let(:policy_actor_test_class) do + Class.new do + include PolicyActor + end + end + + before do + stub_const('PolicyActorTestClass', policy_actor_test_class) + end + it 'implements all the methods from user' do methods = subject.instance_methods @@ -10,4 +20,10 @@ RSpec.describe PolicyActor do # initialized. So here we just use an instance expect(build(:user).methods).to include(*methods) end + + describe '#security_policy_bot?' do + subject { PolicyActorTestClass.new.security_policy_bot? } + + it { is_expected.to eq(false) } + end end |