diff --git a/spec/models/enterprise_spec.rb b/spec/models/enterprise_spec.rb index 1d05f99bd6..f553c518d0 100644 --- a/spec/models/enterprise_spec.rb +++ b/spec/models/enterprise_spec.rb @@ -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