From ddf9807fd2e5e0ec26011051f63fda87c6c1f2f6 Mon Sep 17 00:00:00 2001 From: Luc Donnet Date: Fri, 30 Mar 2018 10:22:26 +0200 Subject: Fix spec/features/calendars_permissions_spec.rb to use correct Workgroup Refs #6258 @1 --- spec/support/referential.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'spec/support') diff --git a/spec/support/referential.rb b/spec/support/referential.rb index 9acdce73a..b50844ae4 100644 --- a/spec/support/referential.rb +++ b/spec/support/referential.rb @@ -8,6 +8,10 @@ module ReferentialHelper Organisation.find_by!(code: "first") end + def first_workgroup + Workgroup.find_by_name('IDFM') + end + def self.included(base) base.class_eval do extend ClassMethods @@ -53,10 +57,18 @@ RSpec.configure do |config| referential.add_member organisation, owner: true end + workgroup = FactoryGirl.create( + :workgroup, + name: "IDFM", + line_referential: line_referential, + stop_area_referential: stop_area_referential + ) + workbench = FactoryGirl.create( :workbench, name: "Gestion de l'offre", organisation: organisation, + workgroup: workgroup, line_referential: line_referential, stop_area_referential: stop_area_referential ) -- cgit v1.2.3