mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-09 03:20:21 +00:00
Add tests
This commit is contained in:
@@ -415,6 +415,18 @@ RSpec.describe Enterprise do
|
||||
expect(e).not_to be_valid
|
||||
end
|
||||
end
|
||||
|
||||
describe "external_billing_id" do
|
||||
it "validates the external_billing_id attribute" do
|
||||
e = build(:enterprise, external_billing_id: '123456')
|
||||
expect(e).to be_valid
|
||||
end
|
||||
|
||||
it "does not validate the external_billing_id attribute with spaces" do
|
||||
e = build(:enterprise, external_billing_id: '123 456')
|
||||
expect(e).not_to be_valid
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "serialisation" do
|
||||
|
||||
Reference in New Issue
Block a user