diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2018-07-27 12:37:19 +0300 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2018-07-27 12:52:45 +0300 |
commit | b577faf785a2c04f8376e3dc597dc0d6ec0b753d (patch) | |
tree | 3968919ef5dff80b90825182c9701486005b9407 /spec/policies/concerns | |
parent | e3aaa56c92f97f8aff3aeb847754794e9eae4706 (diff) |
Rename the module and add a simple test to check
if all methods are also presented in the user.
Diffstat (limited to 'spec/policies/concerns')
-rw-r--r-- | spec/policies/concerns/policy_actor_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/policies/concerns/policy_actor_spec.rb b/spec/policies/concerns/policy_actor_spec.rb new file mode 100644 index 00000000000..27db9710a38 --- /dev/null +++ b/spec/policies/concerns/policy_actor_spec.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +require 'spec_helper' + +describe PolicyActor do + it 'implements all the methods from user' do + methods = subject.instance_methods + + # User.instance_methods do not return all methods until an instance is + # initialized. So here we just use an instance + expect(build(:user).methods).to include(*methods) + end +end |