summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2018-07-27 17:37:19 +0800
committerLin Jen-Shin <godfat@godfat.org>2018-07-27 17:52:45 +0800
commitb577faf785a2c04f8376e3dc597dc0d6ec0b753d (patch)
tree3968919ef5dff80b90825182c9701486005b9407 /spec
parente3aaa56c92f97f8aff3aeb847754794e9eae4706 (diff)
downloadgitlab-ce-b577faf785a2c04f8376e3dc597dc0d6ec0b753d.tar.gz
Rename the module and add a simple test to check
if all methods are also presented in the user.
Diffstat (limited to 'spec')
-rw-r--r--spec/policies/concerns/policy_actor_spec.rb13
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