2015-08-10 11:05:06 +02:00
|
|
|
module FeatureHelpers
|
|
|
|
def login_admin
|
2015-08-13 15:55:19 +02:00
|
|
|
user = create :user
|
2015-08-10 11:05:06 +02:00
|
|
|
login_as user, scope: :user
|
|
|
|
user
|
|
|
|
end
|
|
|
|
|
2015-09-22 10:15:12 +02:00
|
|
|
def login_gestionnaire
|
|
|
|
gestionnaire = create(:gestionnaire)
|
|
|
|
login_as gestionnaire, scope: :gestionnaire
|
|
|
|
end
|
|
|
|
|
2015-08-10 11:05:06 +02:00
|
|
|
def create_dossier
|
2018-01-23 17:15:42 +01:00
|
|
|
dossier = FactoryBot.create(:dossier)
|
2015-08-10 11:05:06 +02:00
|
|
|
dossier
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
RSpec.configure do |config|
|
|
|
|
config.include FeatureHelpers, type: :feature
|
2015-08-20 17:30:17 +02:00
|
|
|
end
|