From 126f312c6b124b036baeb06b69a4dff4ab20497c Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Tue, 7 Aug 2018 12:30:59 +1000 Subject: [PATCH] Make spec more robust not relying on order Enterprises can be in different order. Using `with_options` doesn't care about the order. --- spec/features/admin/enterprise_relationships_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/features/admin/enterprise_relationships_spec.rb b/spec/features/admin/enterprise_relationships_spec.rb index c40b8e8f3b..82c92850d4 100644 --- a/spec/features/admin/enterprise_relationships_spec.rb +++ b/spec/features/admin/enterprise_relationships_spec.rb @@ -111,7 +111,7 @@ feature %q{ scenario "enterprise user can only add their own enterprises as parent" do visit admin_enterprise_relationships_path page.should have_select2 'enterprise_relationship_parent_id', options: ['', d1.name] - page.should have_select2 'enterprise_relationship_child_id', options: ['', d1.name, d2.name, d3.name] + page.should have_select2 'enterprise_relationship_child_id', with_options: ['', d1.name, d2.name, d3.name] end end