Sha256: f6c1813506ed0e0ae49963a59c4ced3609b37a460def3f6fb4b7a7d1787f65c7
Contents?: true
Size: 507 Bytes
Versions: 17
Compression:
Stored size: 507 Bytes
Contents
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
17 entries across 17 versions & 1 rubygems