Skip to content

Commit

Permalink
Merge pull request #4063 from ok32/fix/hardcoded-admin-url
Browse files Browse the repository at this point in the history
Unhardcode admin base url in 'stock_location_stock_item' template
  • Loading branch information
kennyadsl authored May 21, 2021
2 parents b6e24da + b324f84 commit 79e6748
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<td class="stock-location-name">
<a href="/admin/stock_locations/{{stockLocationId}}/stock_movements?q%5Bvariant_sku_eq%5D={{variantSku}}">
<a href="{{admin_url}}/stock_locations/{{stockLocationId}}/stock_movements?q%5Bvariant_sku_eq%5D={{variantSku}}">
{{stockLocationName}}
</a>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
end

it "contains a link to recent stock movements", js: true do
expect(page).to have_link(nil, href: "/admin/stock_locations/#{stock_location.id}/stock_movements?q%5Bvariant_sku_eq%5D=#{variant.sku}")
expect(page).to have_link(nil, href: "http://#{page.server.host}:#{page.server.port}/admin/stock_locations/#{stock_location.id}/stock_movements?q%5Bvariant_sku_eq%5D=#{variant.sku}")
end

it "can create a positive stock adjustment", js: true do
Expand Down

0 comments on commit 79e6748

Please sign in to comment.