From 5ba8efec2cb1e5ace85b69419ec5a045f85b15e0 Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Fri, 20 Dec 2019 17:52:50 +0100 Subject: [PATCH] Fix enterprise group spec EnterpriseGroup.by_position now returns an ActiveRecord::Relation in Rails 4, so in this test case it doesn't respond as an array --- spec/models/enterprise_group_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/models/enterprise_group_spec.rb b/spec/models/enterprise_group_spec.rb index b00a85f3df..6e53349321 100644 --- a/spec/models/enterprise_group_spec.rb +++ b/spec/models/enterprise_group_spec.rb @@ -63,7 +63,7 @@ describe EnterpriseGroup do eg2 = create(:enterprise_group, position: 3) eg3 = create(:enterprise_group, position: 2) - expect(EnterpriseGroup.by_position).to eq([eg1, eg3, eg2]) + expect(EnterpriseGroup.by_position.to_a).to eq([eg1, eg3, eg2]) end it "finds enterprise groups on the front page" do