mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Spec worked, links didn't :)
This commit is contained in:
@@ -23,8 +23,7 @@ class Api::OrderSerializer < ActiveModel::Serializer
|
||||
object.state ? object.state.humanize : nil # Or a call to t() here?
|
||||
end
|
||||
|
||||
delegate :order_url, to: Spree::Core::Engine.routes_url_helpers
|
||||
def path
|
||||
order_url(object.number, only_path: true)
|
||||
Spree::Core::Engine.routes_url_helpers.order_url(object.number, only_path: true)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -36,7 +36,8 @@ feature %q{
|
||||
|
||||
it "reveals table of orders for distributors when clicked" do
|
||||
expand_active_table_node distributor1.name
|
||||
expect(page).to have_content "Order " + d1o1.number.to_s
|
||||
expect(page).to have_link "Order " + d1o1.number, href:"/orders/#{d1o1.number}"
|
||||
|
||||
expand_active_table_node distributor2.name
|
||||
expect(page).not_to have_content "Order " + d1o1.number.to_s
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user