diff --git a/spec/factories.rb b/spec/factories.rb index 39b3a01035..849d38abf3 100644 --- a/spec/factories.rb +++ b/spec/factories.rb @@ -101,12 +101,6 @@ FactoryGirl.define do end factory :enterprise_relationship do - ignore { permissions [] } - after(:create) do |er, proxy| - proxy.permissions.each do |name| - er.permissions.create! name: name - end - end end factory :enterprise_role do diff --git a/spec/features/admin/enterprise_relationships_spec.rb b/spec/features/admin/enterprise_relationships_spec.rb index 7eadf37ffa..20c7b28ac2 100644 --- a/spec/features/admin/enterprise_relationships_spec.rb +++ b/spec/features/admin/enterprise_relationships_spec.rb @@ -14,9 +14,9 @@ feature %q{ scenario "listing relationships" do # Given some enterprises with relationships e1, e2, e3, e4 = create(:enterprise), create(:enterprise), create(:enterprise), create(:enterprise) - create(:enterprise_relationship, parent: e1, child: e2, permissions: [:add_products_to_order_cycle]) - create(:enterprise_relationship, parent: e2, child: e3, permissions: [:manage_products]) - create(:enterprise_relationship, parent: e3, child: e4, permissions: [:add_products_to_order_cycle, :manage_products]) + create(:enterprise_relationship, parent: e1, child: e2, permissions_list: [:add_products_to_order_cycle]) + create(:enterprise_relationship, parent: e2, child: e3, permissions_list: [:manage_products]) + create(:enterprise_relationship, parent: e3, child: e4, permissions_list: [:add_products_to_order_cycle, :manage_products]) # When I go to the relationships page click_link 'Enterprises'