mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Revert "Don't allow spaces in external billing id"
This reverts commit 39825a9ecb.
This commit is contained in:
@@ -127,9 +127,6 @@ class Enterprise < ApplicationRecord
|
||||
message: Spree.t('errors.messages.invalid_instagram_url')
|
||||
}, allow_blank: true
|
||||
validate :validate_white_label_logo_link
|
||||
validates :external_billing_id,
|
||||
format: { with:/\A\S+\Z/ },
|
||||
allow_blank: true
|
||||
|
||||
before_validation :initialize_permalink, if: lambda { permalink.nil? }
|
||||
before_validation :set_unused_address_fields
|
||||
|
||||
@@ -415,13 +415,6 @@ RSpec.describe Enterprise do
|
||||
expect(e).not_to be_valid
|
||||
end
|
||||
end
|
||||
|
||||
describe "external_billing_id" do
|
||||
it "does not validate the external_billing_id attribute with a space" do
|
||||
e = build(:enterprise, external_billing_id: 'with spaces')
|
||||
expect(e).not_to be_valid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "serialisation" do
|
||||
|
||||
Reference in New Issue
Block a user