summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorHombreLaser <sebastian-440@live.com>2023-03-09 18:56:25 -0600
committerHombreLaser <sebastian-440@live.com>2023-03-09 18:56:25 -0600
commit6cf54e76f0ca4b30f6883f15c3a64aca4f4eddd2 (patch)
tree35c8cf7d37d9a70b83e63fb4e327068f405d0833 /spec
parent09a00d91fae22de6d455eb96b59927dfda320dda (diff)
Añade modelo company
Diffstat (limited to 'spec')
-rw-r--r--spec/models/company_spec.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/models/company_spec.rb b/spec/models/company_spec.rb
new file mode 100644
index 0000000..7fe3a87
--- /dev/null
+++ b/spec/models/company_spec.rb
@@ -0,0 +1,11 @@
+# frozen_string_literal: true
+
+require 'rails_helper'
+
+RSpec.describe Company, type: :model do
+ it { should validate_presence_of(:name) }
+ it { should validate_presence_of(:short_name) }
+ it { should validate_presence_of(:country) }
+ it { should validate_uniqueness_of(:short_name).ignoring_case_sensitivity }
+ it { should have_one_attached(:logo) }
+end