views:

35

answers:

0

I am trying to test the following permission using Cucumber

  set_permission(:edit_vacancies).
   with_controller(:admin__vacancies).
  only_methods(:edit, :update).
    to_model(:vacancy).where(:editor_ids).includes(:current_user_id)

this is working as expected when I fire up the site in the browser, but not in cucumber. I guess it is because Lockdown is trying to get the value of :current_user_id from the controller object, but cucumber does not have access to it.

Has anyone come across this and have a advice?