When showing enterprise, do not show enterprise name when we're in this enterprise - fix duplicate name in header

This commit is contained in:
Rohan Mitchell
2013-09-10 11:56:00 +10:00
parent 583164efb5
commit a136161dd6
3 changed files with 4 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
%h2= @enterprise.name
- if @enterprise != current_order(false).andand.distributor
%h2= @enterprise.name
.enterprise-description= @enterprise.long_description.andand.html_safe

View File

@@ -18,7 +18,7 @@ feature %q{
visit spree.select_distributor_order_path(d)
# Then I should see the name of the distributor that I've selected
page.should have_selector 'h2', :text => 'Melb Uni Co-op'
page.should have_selector 'h1', :text => 'Melb Uni Co-op'
# And I should see the distributor's long description
page.should have_selector 'div.enterprise-description', :text => 'Hello, world!'

View File

@@ -101,10 +101,9 @@ feature %q{
# And when I choose an order cycle
select_by_value order_cycle.id, :from => 'order_order_cycle_id'
page.execute_script "$('#order_order_cycle_id').trigger('change');"
# Then I should see the distributor details
page.should have_selector 'h2', :text => d1.name
page.should have_selector 'h1', :text => d1.name
page.should have_selector 'div.enterprise-description', :text => 'Hello, world!'
# And I should see the first, but not the second product