diff options
| author | Teddy Wing | 2017-06-15 16:37:33 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-06-15 16:38:44 +0200 | 
| commit | b011960b67c7cadecb8d948934f13071d9ae4df1 (patch) | |
| tree | 972afaa0fa7dbf6a9fdc1e007a5165fb679a8c52 | |
| parent | 690428d470440c604dcac52549baca8887fcd4c3 (diff) | |
| download | chouette-core-b011960b67c7cadecb8d948934f13071d9ae4df1.tar.bz2 | |
spec/Support::Pundit::Policies: Use UserContext instead of OpenStruct
There's a `UserContext` class that allows us to build user contexts. We
should use the full type for this instead of creating an anonymous one
for the context.
| -rw-r--r-- | spec/support/pundit/policies.rb | 2 | 
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/pundit/policies.rb b/spec/support/pundit/policies.rb index e18309226..56433b2ee 100644 --- a/spec/support/pundit/policies.rb +++ b/spec/support/pundit/policies.rb @@ -9,7 +9,7 @@ module Support        end        def create_user_context(user:, referential:) -        OpenStruct.new(user: user, context: {referential: referential}) +        UserContext.new(user, referential: referential)        end        def add_permissions(*permissions, for_user:)  | 
