Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save cored/891f7f68aa17c820e7cb4f01e6537cbe to your computer and use it in GitHub Desktop.
Save cored/891f7f68aa17c820e7cb4f01e6537cbe to your computer and use it in GitHub Desktop.
require "rails_helper"
feature "Users see case pack labels button", :as_admin_user do
scenario "When the shipment is reserve" do
warehouse = create(:warehouse)
inventory_item = create(:inventory_item)
shipment_item = create(:shipment_item, inventory_item: inventory_item)
bulk_shipment = create(:bulk_shipment, shipment_items: [shipment_item])
visit warehouse_bulk_shipment_path(warehouse_id: warehouse.id, id: bulk_shipment.id)
expect(page).to have_link("Download Case Pack Label PDF")
end
scenario "When the shipment is not reserve" do
warehouse = create(:warehouse)
bulk_shipment = create(:bulk_shipment)
visit warehouse_bulk_shipment_path(warehouse_id: warehouse.id, id: bulk_shipment.id)
expect(page).to have_link("Download Case Pack Label PDF", visible: false)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment