Sha256: 234111716656e377e72a571d6be25f5b75fe09bb44e0c0b2829642d1c4b073b8
Contents?: true
Size: 538 Bytes
Versions: 34
Compression:
Stored size: 538 Bytes
Contents
# frozen_string_literal: true shared_examples "modifying product actions are restricted" do it "cannot create a new product if not an admin" do post spree.api_products_path, params: { product: { name: "Brand new product!" } } assert_unauthorized! end it "cannot update a product" do put spree.api_product_path(product), params: { product: { name: "I hacked your store!" } } assert_unauthorized! end it "cannot delete a product" do delete spree.api_product_path(product) assert_unauthorized! end end
Version data entries
34 entries across 34 versions & 1 rubygems