mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix edit enterprise link to point to edit page, fix spec breakages
This commit is contained in:
@@ -38,7 +38,7 @@
|
||||
<td><%= enterprise.description %></td>
|
||||
<td data-hook="admin_users_index_row_actions">
|
||||
|
||||
<%= link_to_with_icon('icon-edit', 'Edit Profile', main_app.admin_enterprise_path(enterprise), class: 'edit') %><br />
|
||||
<%= link_to_with_icon('icon-edit', 'Edit Profile', main_app.edit_admin_enterprise_path(enterprise), class: 'edit') %><br />
|
||||
<%= link_to_delete_enterprise enterprise %><br />
|
||||
|
||||
<%= link_to_with_icon 'icon-chevron-right', 'Payment Methods', spree.admin_payment_methods_path(enterprise_id: enterprise.id) %> (<%= enterprise.payment_methods.count %>)<br />
|
||||
|
||||
@@ -76,7 +76,7 @@ feature %q{
|
||||
login_to_admin_section
|
||||
|
||||
click_link 'Enterprises'
|
||||
click_link 'Edit'
|
||||
click_link 'Edit Profile'
|
||||
|
||||
fill_in 'enterprise_name', :with => 'Eaterprises'
|
||||
fill_in 'enterprise_description', :with => 'Connecting farmers and eaters'
|
||||
@@ -156,7 +156,7 @@ feature %q{
|
||||
|
||||
scenario "can edit enterprises I have permission to" do
|
||||
click_link 'Enterprises'
|
||||
within('#listing_enterprises tbody tr:first') { click_link 'Edit' }
|
||||
within('#listing_enterprises tbody tr:first') { click_link 'Edit Profile' }
|
||||
|
||||
fill_in 'enterprise_name', :with => 'Eaterprises'
|
||||
click_button 'Update'
|
||||
|
||||
@@ -5,8 +5,8 @@ module Spree
|
||||
it "finds payment methods for a particular distributor" do
|
||||
d1 = create(:distributor_enterprise)
|
||||
d2 = create(:distributor_enterprise)
|
||||
pm1 = create(:payment_method, distributors: [d1, d1])
|
||||
pm2 = create(:payment_method, distributors: [d2, d2])
|
||||
pm1 = create(:payment_method, distributors: [d1])
|
||||
pm2 = create(:payment_method, distributors: [d2])
|
||||
|
||||
PaymentMethod.for_distributor(d1).should == [pm1]
|
||||
end
|
||||
|
||||
@@ -21,8 +21,8 @@ module Spree
|
||||
it "finds shipping methods for a particular distributor" do
|
||||
d1 = create(:distributor_enterprise)
|
||||
d2 = create(:distributor_enterprise)
|
||||
sm1 = create(:shipping_method, distributors: [d1, d1])
|
||||
sm2 = create(:shipping_method, distributors: [d2, d2])
|
||||
sm1 = create(:shipping_method, distributors: [d1])
|
||||
sm2 = create(:shipping_method, distributors: [d2])
|
||||
|
||||
ShippingMethod.for_distributor(d1).should == [sm1]
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user