diff --git a/rails_application/test/integration/products_test.rb b/rails_application/test/integration/products_test.rb new file mode 100644 index 000000000..e6bcabbb1 --- /dev/null +++ b/rails_application/test/integration/products_test.rb @@ -0,0 +1,18 @@ +require "test_helper" + +class ProductsTest < InMemoryRESIntegrationTestCase + cover "Products*" + + def test_add_product_with_worng_vat_rate_code + product_id = SecureRandom.uuid + post "/products", + params: { + "authenticity_token" => "[FILTERED]", + "product_id" => SecureRandom.uuid, + "name" => "Product 1", + "vat_rate" => "50", + } + follow_redirect! + assert_select("#notice", "Selected VAT rate not applicable") + end +end