aboutsummaryrefslogtreecommitdiffstats
path: root/script
diff options
context:
space:
mode:
authorTeddy Wing2017-06-08 18:00:01 +0200
committerTeddy Wing2017-06-08 18:00:01 +0200
commit5d9ed9d90ada31f9ee895111613d970473981096 (patch)
tree29175b939153bdc64cc9416ecc4bccf0899db355 /script
parenta2fc8b0253819fa5585a04cf9c8232a689184b29 (diff)
downloadchouette-core-5d9ed9d90ada31f9ee895111613d970473981096.tar.bz2
TableBuilder spec: Get past Pundit errors
Add a bunch of mocks etc. to get past errors related to using Pundit inside the helper. These errors included: * No method `policy` (included `Pundit` in `TableBuilderHelper`) * No method `authenticate` (mocked a `current_user` method on the helper) * Need to return a `user_context` from `current_user` to make policy's `#new` happy (no method `user` on `User`) At first tried to use the `create_user_context` method from spec/support/pundit, but it wasn't in scope so I just did it directly to get it working. Don't like all the mocks at all. A lot of pre-work to do just to get the helper to execute without exceptions. Refs #3479
Diffstat (limited to 'script')
0 files changed, 0 insertions, 0 deletions