mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-03 06:59:14 +00:00
Switch to correct grammatical ordering of child/parent enterprise on enterprise relationships page
This commit is contained in:
@@ -119,6 +119,6 @@ feature %q{
|
||||
def have_relationship(parent, child, perms=[])
|
||||
perms = perms.join(' ') || 'permits'
|
||||
|
||||
have_table_row [parent.name, perms, child.name, '']
|
||||
have_table_row [child.name, perms, parent.name, '']
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,10 +6,10 @@ describe EnterpriseRelationship do
|
||||
let(:e2) { create(:enterprise, name: 'B') }
|
||||
let(:e3) { create(:enterprise, name: 'C') }
|
||||
|
||||
it "sorts by parent, child enterprise name" do
|
||||
er1 = create(:enterprise_relationship, parent: e1, child: e3)
|
||||
er2 = create(:enterprise_relationship, parent: e2, child: e1)
|
||||
er3 = create(:enterprise_relationship, parent: e1, child: e2)
|
||||
it "sorts by child, parent enterprise name" do
|
||||
er1 = create(:enterprise_relationship, parent: e3, child: e1)
|
||||
er2 = create(:enterprise_relationship, parent: e1, child: e2)
|
||||
er3 = create(:enterprise_relationship, parent: e2, child: e1)
|
||||
|
||||
EnterpriseRelationship.by_name.should == [er3, er1, er2]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user