Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <tbody data-hook>
- <% historic_data.line_items.each do |item| %>
- <tr data-hook="order_details_line_item_row">
- <td>
- <div data-hook="order_item_image">
- <img src="<%= item.variant.images&.first&.listing_url %>" />
- </div>
- </tr>
- <% end %>
- </tbody>
- require "rails_helper"
- require "spec_helper"
- describe "rendering locals in a partial" do
- let(:historic_order) do
- create(:historic_order, data: {
- line_items: [{
- variant: {
- images: [{ listing_url: 'example.com/image.jpg' }]
- }
- }]
- })
- end
- before do
- assign(:order, historic_order.order)
- end
- it "displays the image" do
- end
- end
Add Comment
Please, Sign In to add comment